From 247565c11ebaca4efad71214e9f4a950ae93b0d5 Mon Sep 17 00:00:00 2001 From: gazev Date: Sun, 17 Nov 2024 17:41:27 +0000 Subject: [PATCH] fix: invariant check on join_date --- app/models/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/models.py b/app/models/models.py index 8245f75..a0b4b95 100644 --- a/app/models/models.py +++ b/app/models/models.py @@ -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):