mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-12-25 06:22:23 +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
|
||||
Dictionary with user data to update.
|
||||
"""
|
||||
self.email = data['email']
|
||||
self.first_name = data['first_name']
|
||||
self.last_name = data['last_name']
|
||||
self.phone_number = data['profile']['phone_number']
|
||||
self.address = data['profile']['address']
|
||||
self.comment = data['profile']['section']
|
||||
self.email = data['email'] or ''
|
||||
self.first_name = data['first_name'] or ''
|
||||
self.last_name = data['last_name'] or ''
|
||||
self.phone_number = data['profile']['phone_number'] or ''
|
||||
self.address = data['profile']['address'] or ''
|
||||
self.comment = data['profile']['section'] or ''
|
||||
|
||||
for membership_dict in data['memberships']:
|
||||
if membership_dict['club'] != 22: # Med
|
||||
|
Loading…
Reference in New Issue
Block a user