Skip to content

Commit

Permalink
fix: allow phone and email to be null (dongri#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ra0x3 committed Dec 20, 2023
1 parent 55c9094 commit 3c7825b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 2 additions & 2 deletions www/backend/helpar/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ class Meta:

id: models.UUIDField = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
username: models.CharField = models.CharField(max_length=255, unique=True)
email: models.CharField = models.CharField(max_length=255, unique=True)
phone: models.CharField = models.CharField(max_length=255, unique=True)
email: models.CharField = models.CharField(max_length=255, unique=True, null=True)
phone: models.CharField = models.CharField(max_length=255, unique=True, null=True)
jwt: models.CharField = models.CharField(max_length=255, unique=True)
updated_at: models.DateTimeField = models.DateTimeField()
created_at: models.DateTimeField = models.DateTimeField()
Expand Down
2 changes: 0 additions & 2 deletions www/backend/helpar/users/uses.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ def google_auth_callback(abs_uri: str, state: Optional[str]) -> Tuple[status, Di
user = User.objects.create(
username=profile["name"],
email=profile["email"],
phone="",
updated_at=timezone.now(),
created_at=timezone.now(),
)
Expand Down Expand Up @@ -137,7 +136,6 @@ def twilio_phone_auth_verification(
if not user:
user = User.objects.create(
username=params.canoncial_phone,
email="",
phone=params.canoncial_phone,
updated_at=timezone.now(),
created_at=timezone.now(),
Expand Down

0 comments on commit 3c7825b

Please sign in to comment.