2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-17 17:58:22 +00:00

Schema: Mark nullable fields (#9546)

* Add allow_null to nullable fields

* Fix serializer for InfoApi, add nullable flags

* Bump api version

* Fix incorrectly replaced required tag
This commit is contained in:
Joe Rogers
2025-04-21 08:59:23 +02:00
committed by GitHub
parent bd74044ed9
commit 0de8e61d53
10 changed files with 120 additions and 63 deletions

View File

@@ -169,7 +169,7 @@ class CompanySerializer(
read_only=True,
)
primary_address = AddressSerializer(required=False, allow_null=True, read_only=True)
primary_address = AddressSerializer(allow_null=True, read_only=True)
image = InvenTreeImageSerializerField(required=False, allow_null=True)
@@ -463,7 +463,7 @@ class SupplierPartSerializer(
)
MPN = serializers.CharField(
source='manufacturer_part.MPN', read_only=True, label=_('MPN')
source='manufacturer_part.MPN', read_only=True, allow_null=True, label=_('MPN')
)
# Date fields