Free-Rooms implementation #17
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user