Free-Rooms implementation #17

Merged
jonas merged 4 commits from db_fixes_plus_free_rooms into main 2025-12-09 14:38:46 +00:00
Showing only changes of commit f6929ca7cc - Show all commits

View File

@@ -290,8 +290,10 @@ class FreeRoomsAction(AlpineBitsAction):
# Validate standard inventory entries
inv_type_code = (sac.inv_type_code or "").strip()
if not inv_type_code:
error_message = "InvTypeCode is required unless AllInvCode=\"true\" or similar truthy values"
_LOGGER.info(error_message)
raise FreeRoomsProcessingError(
"InvTypeCode is required unless AllInvCode=\"true\"",
error_message,
HttpStatusCode.BAD_REQUEST,
)
@@ -301,8 +303,10 @@ class FreeRoomsAction(AlpineBitsAction):
# Check for overlap with closing seasons
for closing_start, closing_end in closing_season_ranges:
if self._date_ranges_overlap(start_date, end_date, closing_start, closing_end):
error_message = f"Inventory entry ({start_date} to {end_date}) overlaps with closing season ({closing_start} to {closing_end})"
_LOGGER.info(error_message)
raise FreeRoomsProcessingError(
f"Inventory entry ({start_date} to {end_date}) overlaps with closing season ({closing_start} to {closing_end})",
error_message,
HttpStatusCode.BAD_REQUEST,
)