django-ninja-aio-crud 0.7.0__py3-none-any.whl → 0.7.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-ninja-aio-crud
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Django Ninja AIO CRUD - Rest Framework
5
5
  Author: Giuseppe Casillo
6
6
  Requires-Python: >=3.10
@@ -1,13 +1,13 @@
1
- ninja_aio/__init__.py,sha256=0hUbl6e46JSJW76-kB74s2Vu6nXYrv6r9Jaq_ihI3SQ,119
1
+ ninja_aio/__init__.py,sha256=8P6VZOWIdtS3r61PfrmErqwjAcr3CE2ewOCfytbBXQU,119
2
2
  ninja_aio/api.py,sha256=Fe6l3YCy7MW5TY4-Lbl80CFuK2NT2Y7tHfmqPk6Mqak,1735
3
3
  ninja_aio/auth.py,sha256=fKboioU4sezPukKJukIwiboxml_KV7irhCH3vGYt5pU,1008
4
4
  ninja_aio/exceptions.py,sha256=gPnZX1Do2GXudbU8wDYkwhO70Qj0ZNrIJJ2UXRs9vYk,2241
5
- ninja_aio/models.py,sha256=R_CrpLlwEQjR10VBTIt8YStzOwBHfhuo1E_xFSNxlrE,17628
5
+ ninja_aio/models.py,sha256=ThPkVJd_OZFG3XvDc9NbDm0Eqqglu2nmvgpZapFHuBs,17630
6
6
  ninja_aio/parsers.py,sha256=e_4lGCPV7zs-HTqtdJTc8yQD2KPAn9njbL8nF_Mmgkc,153
7
7
  ninja_aio/renders.py,sha256=mHeKNJtmDhZmgFpS9B6SPn5uZFcyVXrsoMhr149LeW8,1555
8
8
  ninja_aio/schemas.py,sha256=EgRkfhnzZqwGvdBmqlZixMtMcoD1ZxV_qzJ3fmaAy20,113
9
9
  ninja_aio/types.py,sha256=EHznS-6KWLwSX5hLeXbAi7qHWla09_rGeQraiLpH-aY,491
10
10
  ninja_aio/views.py,sha256=qROag0OsMeVUXcnUYKV7ZmWj4E0F-QH52PI2-56zVRs,9263
11
- django_ninja_aio_crud-0.7.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
12
- django_ninja_aio_crud-0.7.0.dist-info/METADATA,sha256=bo1TL2NTpz3T3vsh0aPw_fpcrR5GUx1qqB36S6-HECY,13737
13
- django_ninja_aio_crud-0.7.0.dist-info/RECORD,,
11
+ django_ninja_aio_crud-0.7.1.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
12
+ django_ninja_aio_crud-0.7.1.dist-info/METADATA,sha256=JzqFMQ0s1_YE7btEOuFUYKbUhhLiRjQz89IWIy4ubms,13737
13
+ django_ninja_aio_crud-0.7.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__ = "0.7.0"
3
+ __version__ = "0.7.1"
4
4
 
5
5
  from .api import NinjaAIO
6
6
 
ninja_aio/models.py CHANGED
@@ -432,7 +432,7 @@ class ModelSerializer(models.Model, metaclass=ModelSerializerMeta):
432
432
  rel_obj = field_obj.related.related_model
433
433
  rel_type = "one"
434
434
 
435
- if not rel_obj.get_fields("read") or not rel_obj.get_custom_fields("read"):
435
+ if not rel_obj.get_fields("read") and not rel_obj.get_custom_fields("read"):
436
436
  continue
437
437
  rel_data = cls.get_reverse_relation_schema(rel_obj, rel_type, f)
438
438
  reverse_rels.append(rel_data)
@@ -441,7 +441,7 @@ class ModelSerializer(models.Model, metaclass=ModelSerializerMeta):
441
441
  field_obj, (ForwardOneToOneDescriptor, ForwardManyToOneDescriptor)
442
442
  ):
443
443
  rel_obj = field_obj.field.related_model
444
- if not rel_obj.get_fields("read") or not rel_obj.get_custom_fields("read"):
444
+ if not rel_obj.get_fields("read") and not rel_obj.get_custom_fields("read"):
445
445
  continue
446
446
  rel_data = cls.get_forward_relation_schema(rel_obj, f)
447
447
  rels.append(rel_data)