updated service binders updated
This commit is contained in:
@@ -295,14 +295,17 @@ class Event2Employee(CrudCollection):
|
||||
db=db,
|
||||
).data
|
||||
service_ids = list(set([event.event_service_id for event in employee_events]))
|
||||
print("service_ids", service_ids)
|
||||
active_event_ids = Service2Events.filter_all(
|
||||
Service2Events.service_id.in_(service_ids),
|
||||
db=db,
|
||||
).data
|
||||
print("active_event_ids", active_event_ids)
|
||||
active_events = Events.filter_all(
|
||||
Events.id.in_([event.event_id for event in active_event_ids]),
|
||||
db=db,
|
||||
).data
|
||||
print("active_events", active_events)
|
||||
if extra_events := Event2EmployeeExtra.filter_all(
|
||||
Event2EmployeeExtra.employee_id == employee_id,
|
||||
db=db,
|
||||
@@ -318,6 +321,7 @@ class Event2Employee(CrudCollection):
|
||||
events_dict[str(event.endpoint_code)] = str(event.function_code)
|
||||
else:
|
||||
ValueError("Duplicate event code found for single endpoint")
|
||||
print("events_dict", events_dict)
|
||||
return events_dict
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user