muffin-rest 11.0.0__tar.gz → 11.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/PKG-INFO +1 -1
  2. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/handler.py +4 -4
  3. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/pyproject.toml +1 -1
  4. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/LICENSE +0 -0
  5. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/README.rst +0 -0
  6. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/__init__.py +0 -0
  7. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/api.py +0 -0
  8. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/errors.py +0 -0
  9. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/filters.py +0 -0
  10. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/handler.py +0 -0
  11. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/limits.py +0 -0
  12. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/marshmallow.py +0 -0
  13. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/__init__.py +0 -0
  14. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/filters.py +0 -0
  15. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/schema.py +0 -0
  16. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/sorting.py +0 -0
  17. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/types.py +0 -0
  18. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/mongo/utils.py +0 -0
  19. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/openapi.py +0 -0
  20. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/options.py +0 -0
  21. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/__init__.py +0 -0
  22. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/filters.py +0 -0
  23. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/openapi.py +0 -0
  24. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/options.py +0 -0
  25. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/schemas.py +0 -0
  26. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/sorting.py +0 -0
  27. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/types.py +0 -0
  28. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/peewee/utils.py +0 -0
  29. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/py.typed +0 -0
  30. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/redoc.html +0 -0
  31. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/schemas.py +0 -0
  32. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/sorting.py +0 -0
  33. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/sqlalchemy/__init__.py +0 -0
  34. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/sqlalchemy/filters.py +0 -0
  35. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/sqlalchemy/sorting.py +0 -0
  36. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/sqlalchemy/types.py +0 -0
  37. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/swagger.html +0 -0
  38. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/types.py +0 -0
  39. {muffin_rest-11.0.0 → muffin_rest-11.0.1}/muffin_rest/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: muffin-rest
3
- Version: 11.0.0
3
+ Version: 11.0.1
4
4
  Summary: The package provides enhanced support for writing REST APIs with Muffin framework
5
5
  License: MIT
6
6
  Keywords: rest,api,muffin,asgi,asyncio,trio
@@ -52,7 +52,7 @@ class PWRESTBase(RESTBase[TVModel], PeeweeOpenAPIMixin):
52
52
  ) -> pw.ModelSelect: ...
53
53
 
54
54
  # NOTE: there is not a default sorting for peewee (conflict with muffin-admin)
55
- async def prepare_collection(self, _: Request):
55
+ async def prepare_collection(self, _: Request): # type: ignore[override]
56
56
  """Initialize Peeewee QuerySet for a binded to the resource model."""
57
57
  return self.meta.model.select()
58
58
 
@@ -86,7 +86,7 @@ class PWRESTBase(RESTBase[TVModel], PeeweeOpenAPIMixin):
86
86
  self: PWRESTBase[pw.Model], _: Request, *, limit: int = 0, offset: int = 0
87
87
  ) -> tuple[pw.ModelSelect, int | None]: ...
88
88
 
89
- async def paginate(self, _: Request, *, limit: int = 0, offset: int = 0):
89
+ async def paginate(self, _: Request, *, limit: int = 0, offset: int = 0): # type: ignore[override]
90
90
  """Paginate the collection."""
91
91
  if self.meta.limit_total:
92
92
  cqs = cast(pw.ModelSelect, self.collection.order_by())
@@ -114,9 +114,9 @@ class PWRESTBase(RESTBase[TVModel], PeeweeOpenAPIMixin):
114
114
  meta = self.meta
115
115
  manager = meta.manager
116
116
  if issubclass(meta.model, AIOModel):
117
- await resource.save()
117
+ await resource.save(force_insert=not update)
118
118
  else:
119
- await manager.save(resource)
119
+ await manager.save(resource, force_insert=not update)
120
120
 
121
121
  return resource
122
122
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "muffin-rest"
3
- version = "11.0.0"
3
+ version = "11.0.1"
4
4
  description = "The package provides enhanced support for writing REST APIs with Muffin framework"
5
5
  readme = "README.rst"
6
6
  homepage = "https://github.com/klen/muffin-rest"
File without changes
File without changes