From 6f2e7e0fd0f5bd679059e939f01d3058bcc3445a Mon Sep 17 00:00:00 2001 From: Josue Santana Date: Sat, 22 Jun 2024 06:48:44 -0400 Subject: [PATCH] Another fix for validator. --- server/models/check_in.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/models/check_in.py b/server/models/check_in.py index 9482fcaf..f6c2fe5d 100644 --- a/server/models/check_in.py +++ b/server/models/check_in.py @@ -68,7 +68,7 @@ def validate_check_in_time(db, user_id, proposed_time): return True # No conflicts found # Validator to ensure reminder times are valid - @validator('reminder_times', each_item=True, mode='True') + @validator('reminder_times', each_item=True, pre=True) def validate_reminder_times(cls, v): if v.total_seconds() not in [3600, 86400, 604800, 2592000]: # 1 hour, 1 day, 1 week, ~1 month raise ValueError("Invalid reminder time")