django-ninja-aio-crud 2.12.0__py3-none-any.whl → 2.12.1__py3-none-any.whl

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.

Potentially problematic release.


This version of django-ninja-aio-crud might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: django-ninja-aio-crud
3
- Version: 2.12.0
3
+ Version: 2.12.1
4
4
  Summary: Django Ninja AIO CRUD - Rest Framework
5
5
  Author: Giuseppe Casillo
6
6
  Requires-Python: >=3.10, <3.15
@@ -1,4 +1,4 @@
1
- ninja_aio/__init__.py,sha256=vbhcy0b0GEAvlhzDMwqTW0244wyujnu_6FIEN3S3GJs,120
1
+ ninja_aio/__init__.py,sha256=VnXks7HBLJ2tZT6r9e4AVSFvISb8EEx7v4IznmY0N84,120
2
2
  ninja_aio/api.py,sha256=tuC7vdvn7s1GkCnSFy9Kn1zv0glZfYptRQVvo8ZRtGQ,2429
3
3
  ninja_aio/auth.py,sha256=4sWdFPjKiQgUL1d_CSGDblVjnY5ptP6LQha6XXdluJA,9157
4
4
  ninja_aio/exceptions.py,sha256=_3xFqfFCOfrrMhSA0xbMqgXy8R0UQjhXaExrFvaDAjY,3891
@@ -12,7 +12,7 @@ ninja_aio/factory/__init__.py,sha256=IdH2z1ZZpv_IqonaDfVo7IsMzkgop6lHqz42RphUYBU
12
12
  ninja_aio/factory/operations.py,sha256=OgWGqq4WJ4arSQrH9FGAby9kx-HTdS7MOITxHdYMk18,12051
13
13
  ninja_aio/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  ninja_aio/helpers/api.py,sha256=2beyexep-ehgaA_1bV5Yuh3zRDVcRCMkrW94nmfDWEA,20819
15
- ninja_aio/helpers/query.py,sha256=NMGkS_v-ZVYKNtf1XohEUzfwca52Eq5FTcQ5lehHjus,4682
15
+ ninja_aio/helpers/query.py,sha256=Lqv4nrWYr543tC5K-SEcBottLID8cb83aDc26i2Wxj4,5053
16
16
  ninja_aio/models/__init__.py,sha256=L3UQnQAlKoI3F7jinadL-Nn55hkPvnSRPYW0JtnbWFo,114
17
17
  ninja_aio/models/serializers.py,sha256=uLy0FlVWw7aqr4K0UDk4In-QFGjYLL9RfPX103ApV10,38603
18
18
  ninja_aio/models/utils.py,sha256=lAXtc3YY7_n4f0jIacX4DSXhUOzMy7y5MsBnInNxtfk,32874
@@ -24,7 +24,7 @@ ninja_aio/schemas/helpers.py,sha256=Vti5BfHWpxaJXj_ixZBJb34VRwhHODrlVjRlIuHh_ug,
24
24
  ninja_aio/views/__init__.py,sha256=DEzjWA6y3WF0V10nNF8eEurLNEodgxKzyFd09AqVp3s,148
25
25
  ninja_aio/views/api.py,sha256=AAqkj0xT8J3PmJvsbluZ33cfrmrXJHiV9ARe2BqnfQ8,22492
26
26
  ninja_aio/views/mixins.py,sha256=Zl6J8gbVagwT85bzDuKyJTk3iFxxFgX0YgYkjiUxZGg,17040
27
- django_ninja_aio_crud-2.12.0.dist-info/licenses/LICENSE,sha256=yrDAYcm0gRp_Qyzo3GQa4BjYjWRkAhGC8QRva__RYq0,1073
28
- django_ninja_aio_crud-2.12.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
29
- django_ninja_aio_crud-2.12.0.dist-info/METADATA,sha256=0SnKArx4qdFLcTE97doPAIsv7BxTPDbvTHeR6wfh-5g,9964
30
- django_ninja_aio_crud-2.12.0.dist-info/RECORD,,
27
+ django_ninja_aio_crud-2.12.1.dist-info/licenses/LICENSE,sha256=yrDAYcm0gRp_Qyzo3GQa4BjYjWRkAhGC8QRva__RYq0,1073
28
+ django_ninja_aio_crud-2.12.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
29
+ django_ninja_aio_crud-2.12.1.dist-info/METADATA,sha256=O5VqJpldXVWYmLHEiW8ede9NyGygvPJ6DGsmz67mWe0,9964
30
+ django_ninja_aio_crud-2.12.1.dist-info/RECORD,,
ninja_aio/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Django Ninja AIO CRUD - Rest Framework"""
2
2
 
3
- __version__ = "2.12.0"
3
+ __version__ = "2.12.1"
4
4
 
5
5
  from .api import NinjaAIO
6
6
 
@@ -78,6 +78,11 @@ class QueryUtil:
78
78
  self.detail_config: ModelQuerySetSchema = self._configs.get(
79
79
  self.SCOPES.DETAIL, ModelQuerySetSchema()
80
80
  )
81
+ # Fallback detail config to read config if not explicitly set
82
+ if not self.detail_config.select_related:
83
+ self.detail_config.select_related = self.read_config.select_related.copy()
84
+ if not self.detail_config.prefetch_related:
85
+ self.detail_config.prefetch_related = self.read_config.prefetch_related.copy()
81
86
 
82
87
  def _get_config(self, conf_name: str) -> ModelQuerySetSchema:
83
88
  """Helper method to retrieve configuration attributes."""
@@ -103,7 +108,7 @@ class QueryUtil:
103
108
  raise ValueError(
104
109
  f"Invalid scope '{scope}' for QueryUtil. Supported scopes: {valid_scopes}"
105
110
  )
106
- config = self._configs.get(scope, ModelQuerySetSchema())
111
+ config: ModelQuerySetSchema = self._configs.get(scope, ModelQuerySetSchema())
107
112
  if config.select_related:
108
113
  queryset = queryset.select_related(*config.select_related)
109
114
  if config.prefetch_related: