Skip to content

Commit

Permalink
Merge branch 'master' into bug_48192
Browse files Browse the repository at this point in the history
  • Loading branch information
mamico authored Nov 10, 2023
2 parents 978db94 + de25451 commit 03ee7e6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@ Changelog
2.1.4 (unreleased)
------------------


- workaround per evitare che i booking sovrapposti, facciano
saltare il calcolo dei free slots
[mamico]

- Compatibility with old code that use booking_types field in PrenotazioniFolder
[mamico]

- Extend the booking duration limit to 180 min.
[folix-01]

Expand Down
12 changes: 12 additions & 0 deletions src/redturtle/prenotazioni/content/prenotazioni_folder.py
Original file line number Diff line number Diff line change
Expand Up @@ -727,3 +727,15 @@ def get_booking_types(self) -> Generator[PrenotazioneType, None, None]:
return self.listFolderContents(
contentFilter={"portal_type": "PrenotazioneType"}
)

# BBB: compatibility with old code (booking_types was a List of IBookingTypeRow)
@property
def booking_types(self):
return [
{
"name": t.title,
"duration": t.duration,
"hidden": t.hidden,
}
for t in self.get_booking_types()
]

0 comments on commit 03ee7e6

Please sign in to comment.