Skip to content

Commit

Permalink
fix: allow partial data in PATCH
Browse files Browse the repository at this point in the history
  • Loading branch information
joaodaher committed Feb 18, 2022
1 parent 7d1c207 commit d27d9a2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "sanic-rest"
version = "1.6.0"
version = "1.6.1"
description = "Sanic Rest Framework with Google Cloud Datastore"
authors = ["Joao Daher <[email protected]>"]
repository = "https://github.com/flamingo-run/sanic-rest"
Expand Down
2 changes: 1 addition & 1 deletion sanic_rest/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async def patch(self, request: request.Request, pk: str) -> response.HTTPRespons
current_obj = self.get_model(pk=pk)

data, files = self._parse_body(request=request)
validated_data = self.validate(data=data, partial=False)
validated_data = self.validate(data=data, partial=True)

try:
obj = await self.perform_update(obj=current_obj, data=validated_data, files=files)
Expand Down

0 comments on commit d27d9a2

Please sign in to comment.