diff --git a/service_app/routers/rules/router.py b/service_app/routers/rules/router.py index 04e9f40..91eeabc 100644 --- a/service_app/routers/rules/router.py +++ b/service_app/routers/rules/router.py @@ -76,6 +76,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): EndpointRestriction.endpoint_name.ilike(f"%{data.endpoint}%"), system=True, ).data + print("endpoint", endpoint) if not endpoint: EndpointRestriction.raise_http_exception( status_code="HTTP_404_NOT_FOUND", @@ -84,9 +85,9 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): data={}, ) event = Events.filter_one(Events.endpoint_id == endpoint.id).data - service = Service2Events.filter_one( - Service2Events.event_id == event.id, - ).data + print("event", event) + service = Service2Events.filter_one(Service2Events.event_id == event.id).data + print("service", service) if isinstance(token_dict, OccupantTokenObject): event_occupant = Event2Occupant.filter_one( Event2Occupant.event_service_id == service.id, @@ -109,6 +110,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess): Event2Employee.event_service_id == service.id, Event2Employee.employee_id == token_dict.selected_company.employee_id, ).data + print("event_employee", event_employee) if not event_employee: EndpointRestriction.raise_http_exception( status_code="HTTP_404_NOT_FOUND",