ui is expecting a value in the membership type even if the user has no membership

pull/66/head
Chris Veilleux 2019-03-04 14:41:56 -06:00
parent 169d026db9
commit e3d42d3aca
1 changed files with 3 additions and 1 deletions

View File

@ -94,7 +94,9 @@ class AccountEndpoint(SeleneEndpoint):
for agreement in response_data['agreements']:
agreement_date = self._format_agreement_date(agreement)
agreement['accept_date'] = agreement_date
if response_data['membership'] is not None:
if response_data['membership'] is None:
response_data['membership'] = dict(type=NO_MEMBERSHIP)
else:
membership_duration = self._format_membership_duration(response_data)
response_data['membership']['duration'] = membership_duration
del (response_data['membership']['start_date'])