Skip to content

Commit

Permalink
Set contact phone
Browse files Browse the repository at this point in the history
  • Loading branch information
mariocesar committed Sep 12, 2021
1 parent 528d3db commit 4785ce9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/aseb/apps/users/views.py
Expand Up @@ -86,9 +86,14 @@ def save(self):
with transaction.atomic():
user = User.objects.create_user(**data)

if birthday:
user.membership.birthday = birthday
user.membership.save(update_fields=["birthday"])
if phone_number:
user.membership.contact["contact_phone"] = phone_number

if birthday:
user.membership.birthday = birthday

if phone_number or birthday:
user.membership.save(update_fields=["birthday"])

return user

Expand Down

0 comments on commit 4785ce9

Please sign in to comment.