Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico committed Aug 24, 2023
1 parent e642ca2 commit cef78e2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/redturtle/prenotazioni/adapters/booker.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ def _create(self, data, duration=-1, force_gate=""):
minutes=duration
)
else:
booking_expiration_date = params["booking_date"] + timedelta(minutes=duration)
booking_expiration_date = params["booking_date"] + timedelta(
minutes=duration
)

gate = ""
if not force_gate:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ def __call__(self, *args, **kwargs):
)
booking_date = self.prenotazione.booking_date
booking_expiration_date = self.prenotazione.booking_expiration_date
if booking_expiration_date and booking_date.date() != booking_expiration_date.date():
if (
booking_expiration_date
and booking_date.date() != booking_expiration_date.date()
):
logger.warning("Booking date and expiration date are different, fixing")
booking_date = booking_date.date()
booking_expiration_date = booking_expiration_date.replace(
Expand Down

0 comments on commit cef78e2

Please sign in to comment.