Skip to content

Commit

Permalink
Another fix for validator.
Browse files Browse the repository at this point in the history
  • Loading branch information
janthonysantana committed Jun 22, 2024
1 parent 7f55957 commit 6f2e7e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/models/check_in.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 6f2e7e0

Please sign in to comment.