diff --git a/CHANGES.rst b/CHANGES.rst index 26c18624..f687178e 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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) diff --git a/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py b/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py index 8a5ea422..5d6d9f4a 100644 --- a/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py +++ b/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py @@ -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 @@ -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