Skip to content

Commit

Permalink
fix: Missing return and incorrect return schema
Browse files Browse the repository at this point in the history
  • Loading branch information
phuongfi91 committed Dec 9, 2024
1 parent b226a3b commit 35547c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django_ninja_crudl/crudl.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ def get_one(
status.HTTP_200_OK: UpdateSchema, # pyright: ignore[reportPossiblyUnboundVariable]
status.HTTP_401_UNAUTHORIZED: Unauthorized401Schema,
status.HTTP_403_FORBIDDEN: Forbidden403Schema,
status.HTTP_404_NOT_FOUND: ErrorSchema,
status.HTTP_404_NOT_FOUND: ResourceNotFound404Schema,
status.HTTP_422_UNPROCESSABLE_ENTITY: UnprocessableEntity422Schema,
status.HTTP_503_SERVICE_UNAVAILABLE: ServiceUnavailable503Schema,
},
Expand Down Expand Up @@ -580,7 +580,7 @@ def update(
return self.get_404_error(request) # noqa: WPS220
request_details.object = obj
if not self.has_object_permission(request_details):
self.get_404_error(request) # noqa: WPS220
return self.get_404_error(request) # noqa: WPS220
self.pre_update(request_details)

for attr_name, attr_value in payload.model_dump().items():
Expand Down

0 comments on commit 35547c4

Please sign in to comment.