Fixes #15995: Permit nullable fields referenced by unique constraints to be omitted from REST API requests

This commit is contained in:
Jeremy Stretch
2024-05-07 14:04:09 -04:00
parent ccf32244d3
commit 4d40699f2c
8 changed files with 13 additions and 12 deletions

View File

@@ -27,7 +27,7 @@ class TenantGroupSerializer(NestedGroupModelSerializer):
class TenantSerializer(NetBoxModelSerializer):
url = serializers.HyperlinkedIdentityField(view_name='tenancy-api:tenant-detail')
group = TenantGroupSerializer(nested=True, required=False, allow_null=True)
group = TenantGroupSerializer(nested=True, required=False, allow_null=True, default=None)
# Related object counts
circuit_count = RelatedObjectCountField('circuits')