Skip to content

Commit

Permalink
Change day validation priority
Browse files Browse the repository at this point in the history
  • Loading branch information
folix-01 committed Dec 2, 2024
1 parent c3173ba commit 4ed9a43
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Changelog
2.8.4 (unreleased)
------------------

- Nothing changed yet.
- Fix first available day result.
[folix-01]


2.8.3 (2024-11-28)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,9 @@ def is_valid_day(self, day, bypass_user_restrictions=False):

is_configured_day = self.is_configured_day(day)

if self.is_vacation_day(day):
return False

if bypass_user_restrictions:
return True

Expand All @@ -324,9 +327,6 @@ def is_valid_day(self, day, bypass_user_restrictions=False):
if day < self.first_bookable_day:
return False

if self.is_vacation_day(day):
return False

if self.last_bookable_day and day > self.last_bookable_day:
return False

Expand Down

0 comments on commit 4ed9a43

Please sign in to comment.