alchemy functions updated

This commit is contained in:
2024-11-10 12:49:31 +03:00
parent e01a2c8afb
commit 7a7241c71c
13 changed files with 238 additions and 180 deletions

View File

@@ -182,13 +182,12 @@ class Event2Occupant(CrudCollection):
cls, build_living_space_id
) -> (list, list):
active_events = cls.filter_all(
cls.build_living_space_id==build_living_space_id,
*cls.valid_record_args(cls)
cls.build_living_space_id == build_living_space_id,
*cls.valid_record_args(cls),
).data
active_events_id = [event.event_id for event in active_events]
active_events = Events.filter_all(
Events.id.in_(active_events_id),
*Events.valid_record_args(Events)
Events.id.in_(active_events_id), *Events.valid_record_args(Events)
).data
active_events_uu_id = [str(event.uu_id) for event in active_events]
return active_events_id, active_events_uu_id