Skip to content

Commit 0c66e20

Browse files
committed
Added null value for no age
1 parent d28d9da commit 0c66e20

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backend/PyMatcha/models/user.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ def to_dict(self) -> Dict:
200200
- self.birthdate.year
201201
- ((today.month, today.day) < (self.birthdate.month, self.birthdate.day))
202202
)
203+
else:
204+
returned_dict["age"] = None
203205
return returned_dict
204206

205207
@classmethod

0 commit comments

Comments
 (0)