Skip to content

Commit

Permalink
fix: invariant check on join_date
Browse files Browse the repository at this point in the history
  • Loading branch information
vugonz committed Nov 17, 2024
1 parent f2146fd commit 247565c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ def check_invariants(self):
# join_date
if not isinstance(self.join_date, str):
raise ValueError("Field 'join_date' must be a string.")
_validate_date_string(self.join_date, "join_date")
if self.join_date != "":
_validate_date_string(self.join_date, "join_date")

# exit_date
if not isinstance(self.exit_date, str):
Expand Down

0 comments on commit 247565c

Please sign in to comment.