auth updated availaible event

This commit is contained in:
2024-12-06 16:35:25 +03:00
parent 88309eb49d
commit 9e955841c3
9 changed files with 51 additions and 34 deletions

View File

@@ -216,7 +216,10 @@ class Event2Employee(CrudCollection):
cls.employee_id == employee_id,
).data
active_events = Service2Events.filter_all(
Service2Events.service_id.in_([event.event_service_id for event in occupant_events]), system=True
Service2Events.service_id.in_(
[event.event_service_id for event in occupant_events]
),
system=True,
).data
active_events_id = [event.event_id for event in active_events]
if extra_events := Event2EmployeeExtra.filter_all(
@@ -265,7 +268,10 @@ class Event2Occupant(CrudCollection):
cls.build_living_space_id == build_living_space_id,
).data
active_events = Service2Events.filter_all(
Service2Events.service_id.in_([event.event_service_id for event in occupant_events]), system=True
Service2Events.service_id.in_(
[event.event_service_id for event in occupant_events]
),
system=True,
).data
active_events_id = [event.event_id for event in active_events]
if extra_events := Event2OccupantExtra.filter_all(