Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 34429b6
Author: Roman <[email protected]>
Date:   Tue Oct 31 10:39:48 2023 +0100

    Fix booking duration handling

commit 0af7e6e
Author: Roman <[email protected]>
Date:   Tue Oct 31 10:16:20 2023 +0100

    Fix BookingType profile

commit 142bb8d
Author: Roman <[email protected]>
Date:   Tue Oct 31 10:00:36 2023 +0100

    Hide gates

commit f748cd7
Author: Roman <[email protected]>
Date:   Fri Oct 27 17:49:34 2023 +0200

    Refactor the @@prenotazioni_context_state.get_booking_type_duration method

commit d1209e7
Author: Roman <[email protected]>
Date:   Thu Oct 26 15:10:41 2023 +0200

    Refactor

commit 8da8dea
Author: Roman <[email protected]>
Date:   Thu Oct 26 15:05:56 2023 +0200

    Refactor

commit 5aac9ce
Author: Roman <[email protected]>
Date:   Thu Oct 26 14:37:37 2023 +0200

    Fix typos

commit 190b0ca
Author: Roman <[email protected]>
Date:   Thu Oct 19 16:54:46 2023 +0200

    Initial implementation
  • Loading branch information
folix-01 committed Oct 31, 2023
1 parent a8fcb20 commit 1589503
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ def booking_type_durations(self):
def get_booking_type_duration(self, booking_type):
"""Return the seconds for this booking_type"""
if type(booking_type) is BookingType:
return booking_type.duration * 60
return int(booking_type.duration) * 60

if type(booking_type) is str:
return self.booking_type_durations.get(booking_type, 1)
Expand Down
2 changes: 1 addition & 1 deletion src/redturtle/prenotazioni/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ def to_2000(context):
booking_type = api.content.create(
type="BookingType",
title=type.get("name"),
duration=int(type.get("duration")),
duration=type.get("duration"),
hidden=type.get("hidden"),
container=obj,
# gates=["all"],
Expand Down

0 comments on commit 1589503

Please sign in to comment.