django-ninja-aio-crud 2.16.0__py3-none-any.whl → 2.16.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.
- {django_ninja_aio_crud-2.16.0.dist-info → django_ninja_aio_crud-2.16.1.dist-info}/METADATA +1 -1
- {django_ninja_aio_crud-2.16.0.dist-info → django_ninja_aio_crud-2.16.1.dist-info}/RECORD +7 -7
- ninja_aio/__init__.py +1 -1
- ninja_aio/exceptions.py +1 -1
- ninja_aio/models/serializers.py +11 -2
- {django_ninja_aio_crud-2.16.0.dist-info → django_ninja_aio_crud-2.16.1.dist-info}/WHEEL +0 -0
- {django_ninja_aio_crud-2.16.0.dist-info → django_ninja_aio_crud-2.16.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
ninja_aio/__init__.py,sha256=
|
|
1
|
+
ninja_aio/__init__.py,sha256=AweoPuranPjCdlZhcv8GL_euzUirxFwM8SdGzLvsPMc,120
|
|
2
2
|
ninja_aio/api.py,sha256=tuC7vdvn7s1GkCnSFy9Kn1zv0glZfYptRQVvo8ZRtGQ,2429
|
|
3
3
|
ninja_aio/auth.py,sha256=f4yk45fLi36Qctu0A0zgHTFedb9yk3ewq5rOMpoPYIE,9035
|
|
4
|
-
ninja_aio/exceptions.py,sha256=
|
|
4
|
+
ninja_aio/exceptions.py,sha256=w8QWmVlg88iJvBrNODSDBHSsy8nNpwngaCGWRnkXoPo,3899
|
|
5
5
|
ninja_aio/parsers.py,sha256=e_4lGCPV7zs-HTqtdJTc8yQD2KPAn9njbL8nF_Mmgkc,153
|
|
6
6
|
ninja_aio/renders.py,sha256=CW0xDa05Xna-UvL0MZqZeDEgueEaUassV_nG7Rh1-cw,1824
|
|
7
7
|
ninja_aio/types.py,sha256=E3yfXbNKkvLVcr8bvkHTSyIiCRZ4zumzJaXj1aiBi5U,735
|
|
@@ -14,7 +14,7 @@ ninja_aio/helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU
|
|
|
14
14
|
ninja_aio/helpers/api.py,sha256=va_HvZVBFm1KxwQhH4u09U4F1JS5JrQuRpRmPTHJt7w,21326
|
|
15
15
|
ninja_aio/helpers/query.py,sha256=Lqv4nrWYr543tC5K-SEcBottLID8cb83aDc26i2Wxj4,5053
|
|
16
16
|
ninja_aio/models/__init__.py,sha256=L3UQnQAlKoI3F7jinadL-Nn55hkPvnSRPYW0JtnbWFo,114
|
|
17
|
-
ninja_aio/models/serializers.py,sha256=
|
|
17
|
+
ninja_aio/models/serializers.py,sha256=FMGXWyuwOhTy1kODJ62G2j5us52yWhTQqqsaKy5VQeA,43191
|
|
18
18
|
ninja_aio/models/utils.py,sha256=lAXtc3YY7_n4f0jIacX4DSXhUOzMy7y5MsBnInNxtfk,32874
|
|
19
19
|
ninja_aio/schemas/__init__.py,sha256=dHILiYBKMb51lDcyQdiXRw_0nzqM7Lu81UX2hv7kEfo,837
|
|
20
20
|
ninja_aio/schemas/api.py,sha256=dGUpJXR1iAf93QNR4kYj1uqIkTjiMfXultCotY6GtaQ,361
|
|
@@ -24,7 +24,7 @@ ninja_aio/schemas/helpers.py,sha256=CpubwNXsZHtu8jddliyQybF1epwZ-GO60vHIuF5AR1Y,
|
|
|
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.16.
|
|
28
|
-
django_ninja_aio_crud-2.16.
|
|
29
|
-
django_ninja_aio_crud-2.16.
|
|
30
|
-
django_ninja_aio_crud-2.16.
|
|
27
|
+
django_ninja_aio_crud-2.16.1.dist-info/licenses/LICENSE,sha256=yrDAYcm0gRp_Qyzo3GQa4BjYjWRkAhGC8QRva__RYq0,1073
|
|
28
|
+
django_ninja_aio_crud-2.16.1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
29
|
+
django_ninja_aio_crud-2.16.1.dist-info/METADATA,sha256=GGBBrtgiM_sGtd95ySROK-3VImety1OoCTnrggFzeb0,9964
|
|
30
|
+
django_ninja_aio_crud-2.16.1.dist-info/RECORD,,
|
ninja_aio/__init__.py
CHANGED
ninja_aio/exceptions.py
CHANGED
|
@@ -78,7 +78,7 @@ def _default_error(
|
|
|
78
78
|
|
|
79
79
|
|
|
80
80
|
def _pydantic_validation_error(
|
|
81
|
-
request: HttpRequest, exc:
|
|
81
|
+
request: HttpRequest, exc: PydanticValidationError, api: type[NinjaAPI]
|
|
82
82
|
) -> HttpResponse:
|
|
83
83
|
"""Translate a pydantic ValidationError into a normalized API error response."""
|
|
84
84
|
error = PydanticValidationError(exc.errors(include_input=False))
|
ninja_aio/models/serializers.py
CHANGED
|
@@ -669,9 +669,18 @@ class BaseSerializer:
|
|
|
669
669
|
customs = cls.get_custom_fields(s_type) + optionals
|
|
670
670
|
excludes = cls.get_excluded_fields(s_type)
|
|
671
671
|
|
|
672
|
-
# If no explicit fields
|
|
672
|
+
# If no explicit fields and no excludes specified
|
|
673
673
|
if not fields and not excludes:
|
|
674
|
-
|
|
674
|
+
if optionals:
|
|
675
|
+
# Use optional field names as the fields to include
|
|
676
|
+
fields = [f[0] for f in optionals]
|
|
677
|
+
elif customs:
|
|
678
|
+
# Only customs defined - exclude all model fields to prevent auto-inclusion
|
|
679
|
+
excludes = [
|
|
680
|
+
f.name
|
|
681
|
+
for f in model._meta.get_fields()
|
|
682
|
+
if getattr(f, "concrete", False)
|
|
683
|
+
]
|
|
675
684
|
|
|
676
685
|
# Only create schema if we have something to include
|
|
677
686
|
if not any([fields, customs, excludes]):
|
|
File without changes
|
{django_ninja_aio_crud-2.16.0.dist-info → django_ninja_aio_crud-2.16.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|