mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-27 10:53:10 +00:00
Put empty strings instead of None as default values
This commit is contained in:
parent
145806b5ce
commit
09c61091d5
@ -59,12 +59,12 @@ class User(AbstractUser):
|
|||||||
data : dict
|
data : dict
|
||||||
Dictionary with user data to update.
|
Dictionary with user data to update.
|
||||||
"""
|
"""
|
||||||
self.email = data['email']
|
self.email = data['email'] or ''
|
||||||
self.first_name = data['first_name']
|
self.first_name = data['first_name'] or ''
|
||||||
self.last_name = data['last_name']
|
self.last_name = data['last_name'] or ''
|
||||||
self.phone_number = data['profile']['phone_number']
|
self.phone_number = data['profile']['phone_number'] or ''
|
||||||
self.address = data['profile']['address']
|
self.address = data['profile']['address'] or ''
|
||||||
self.comment = data['profile']['section']
|
self.comment = data['profile']['section'] or ''
|
||||||
|
|
||||||
for membership_dict in data['memberships']:
|
for membership_dict in data['memberships']:
|
||||||
if membership_dict['club'] != 22: # Med
|
if membership_dict['club'] != 22: # Med
|
||||||
|
Loading…
Reference in New Issue
Block a user