endpoint_restriction_available updated

This commit is contained in:
berkay 2025-01-01 16:45:34 +03:00
parent 17a6609a8f
commit fa66741b48
1 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
print("service", service) print("service", service)
if isinstance(token_dict, OccupantTokenObject): if isinstance(token_dict, OccupantTokenObject):
event_occupant = Event2Occupant.filter_one( event_occupant = Event2Occupant.filter_one(
Event2Occupant.event_service_id == service.id, Event2Occupant.event_service_id == service.service_id,
Event2Occupant.build_living_space_id Event2Occupant.build_living_space_id
== token_dict.selected_occupant.living_space_id, == token_dict.selected_occupant.living_space_id,
).data ).data
@ -107,7 +107,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
) )
elif isinstance(token_dict, EmployeeTokenObject): elif isinstance(token_dict, EmployeeTokenObject):
event_employee = Event2Employee.filter_one( 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, Event2Employee.employee_id == token_dict.selected_company.employee_id,
).data ).data
print("event_employee", event_employee) print("event_employee", event_employee)