mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[FIX]pms_api_rest: alerts per day get overbooking lines
This commit is contained in:
@@ -409,7 +409,9 @@ class PmsCalendarService(Component):
|
||||
PmsCalendarAlertsPerDay = self.env.datamodels["pms.calendar.alerts.per.day"]
|
||||
result = []
|
||||
for day in target_dates:
|
||||
overbooking_lines = next((item for item in result_sql if item[0] == day), 0)
|
||||
overbooking_lines = next(
|
||||
(item[1] for item in result_sql if item[0] == day), 0
|
||||
)
|
||||
result.append(
|
||||
PmsCalendarAlertsPerDay(
|
||||
date=str(datetime.combine(day, datetime.min.time()).isoformat()),
|
||||
|
||||
Reference in New Issue
Block a user