ui is expecting a value in the membership type even if the user has no membership
parent
169d026db9
commit
e3d42d3aca
|
@ -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'])
|
||||
|
|
Loading…
Reference in New Issue