Set postage and international for letters uploaded with a CSV

If the letter is outside of the United Kingdom, set the postage and international flag.
This commit is contained in:
Rebecca Law
2020-08-10 09:35:19 +01:00
parent 725ce38a06
commit 89a8d8912a
3 changed files with 18 additions and 11 deletions

View File

@@ -242,7 +242,7 @@ def validate_address(service, letter_data):
raise ValidationError(
message='Address lines must not start with any of the following characters: @ ( ) = [ ] ” \\ / ,'
)
if address.postage == 'united-kingdom':
return None # use postage from template
else:
if address.international:
return address.postage
else:
return None