alchemy functions updated
This commit is contained in:
@@ -181,12 +181,16 @@ class Event2Occupant(CrudCollection):
|
||||
def get_event_id_by_build_living_space_id(
|
||||
cls, build_living_space_id
|
||||
) -> (list, list):
|
||||
active_events = cls.filter_by_active(
|
||||
build_living_space_id=build_living_space_id
|
||||
)
|
||||
active_events_id = [event.event_id for event in active_events.data]
|
||||
active_events = Events.filter_active(Events.id.in_(active_events_id))
|
||||
active_events_uu_id = [str(event.uu_id) for event in active_events.data]
|
||||
active_events = cls.filter_all(
|
||||
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)
|
||||
).data
|
||||
active_events_uu_id = [str(event.uu_id) for event in active_events]
|
||||
return active_events_id, active_events_uu_id
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user