Booking can be made as early as possible depending on the club booking opening
This commit is contained in:
parent
fc11a1e1eb
commit
8562e101b4
5 changed files with 171 additions and 13 deletions
|
@ -21,7 +21,16 @@ def get_club() -> Club:
|
|||
else []
|
||||
)
|
||||
club_id = os.environ.get("CLUB_ID")
|
||||
return Club(id=club_id, url=club_url, courts_ids=court_ids)
|
||||
booking_open_days_before = int(os.environ.get("BOOKING_OPEN_DAYS_BEFORE", "7"))
|
||||
booking_opening_time_str = os.environ.get("BOOKING_OPENING_TIME", "00:00")
|
||||
booking_opening_time = pendulum.parse(booking_opening_time_str)
|
||||
return Club(
|
||||
id=club_id,
|
||||
url=club_url,
|
||||
courts_ids=court_ids,
|
||||
booking_open_days_before=booking_open_days_before,
|
||||
booking_opening_time=booking_opening_time.time(),
|
||||
)
|
||||
|
||||
|
||||
def get_booking_filter() -> BookingFilter:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue