Fix error message when invitation has expired

The error message for when an invitation to Notify had expired was
displaying in admin with square brackets round it because admin is not
expecting the message to be a list
(a85134ee22/app/models/user.py (L500))
This commit is contained in:
Katie Smith
2020-08-12 18:30:00 +01:00
parent e91252ad43
commit fb36404b6c
2 changed files with 5 additions and 5 deletions

View File

@@ -35,8 +35,8 @@ def validate_invitation_token(invitation_type, token):
max_age_seconds)
except SignatureExpired:
errors = {'invitation':
['Your invitation to GOV.UK Notify has expired. '
'Please ask the person that invited you to send you another one']}
'Your invitation to GOV.UK Notify has expired. '
'Please ask the person that invited you to send you another one'}
raise InvalidRequest(errors, status_code=400)
except BadData:
errors = {'invitation': 'Somethings wrong with this link. Make sure youve copied the whole thing.'}