diff --git a/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py b/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py index 1210697f..3d9c9dff 100644 --- a/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py +++ b/src/redturtle/prenotazioni/browser/prenotazioni_context_state.py @@ -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) diff --git a/src/redturtle/prenotazioni/upgrades.py b/src/redturtle/prenotazioni/upgrades.py index e0d2f953..66825a0c 100644 --- a/src/redturtle/prenotazioni/upgrades.py +++ b/src/redturtle/prenotazioni/upgrades.py @@ -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"],