updated handler exceptions

This commit is contained in:
2025-01-11 19:40:10 +03:00
parent cecf1e69a2
commit 56b693989d
34 changed files with 571 additions and 1126 deletions

View File

@@ -79,7 +79,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
system=True,
).data
if not endpoint:
EndpointRestriction.raise_http_exception(
raise EndpointRestriction.raise_http_exception(
status_code="HTTP_404_NOT_FOUND",
error_case="UNAUTHORIZED",
message="Only Occupant can see this data",
@@ -94,7 +94,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
== token_dict.selected_occupant.living_space_id,
).data
if not event_occupant:
EndpointRestriction.raise_http_exception(
raise EndpointRestriction.raise_http_exception(
status_code="HTTP_404_NOT_FOUND",
error_case="UNAUTHORIZED",
message="This endpoint is not available for this occupant",
@@ -110,7 +110,7 @@ def endpoint_restriction_available(request: Request, data: CheckEndpointAccess):
Event2Employee.employee_id == token_dict.selected_company.employee_id,
).data
if not event_employee:
EndpointRestriction.raise_http_exception(
raise EndpointRestriction.raise_http_exception(
status_code="HTTP_404_NOT_FOUND",
error_case="UNAUTHORIZED",
message="This endpoint is not available for this employee",