Skip to content

Commit

Permalink
Add leeway for validating taken at in future (#2502)
Browse files Browse the repository at this point in the history
add leeway to taken at in future

Co-authored-by: Vignesh Hari <[email protected]>
  • Loading branch information
sainak and vigneshhari authored Sep 26, 2024
1 parent ed4a7e1 commit b9a169b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion care/facility/api/serializers/daily_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def validate(self, attrs):
return validated

def validate_taken_at(self, value):
if value and value > timezone.now():
if value and value > timezone.now() + timedelta(minutes=2):
msg = "Cannot create an update in the future"
raise serializers.ValidationError(msg)
return value

0 comments on commit b9a169b

Please sign in to comment.