diff --git a/service_app/routers/rules/router.py b/service_app/routers/rules/router.py index 91eeabc..781d8e6 100644 --- a/service_app/routers/rules/router.py +++ b/service_app/routers/rules/router.py @@ -90,7 +90,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): print("service", service) if isinstance(token_dict, OccupantTokenObject): event_occupant = Event2Occupant.filter_one( - Event2Occupant.event_service_id == service.id, + Event2Occupant.event_service_id == service.service_id, Event2Occupant.build_living_space_id == token_dict.selected_occupant.living_space_id, ).data @@ -107,7 +107,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): ) elif isinstance(token_dict, EmployeeTokenObject): event_employee = Event2Employee.filter_one( - Event2Employee.event_service_id == service.id, + Event2Employee.event_service_id == service.service_id, Event2Employee.employee_id == token_dict.selected_company.employee_id, ).data print("event_employee", event_employee)