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

@@ -230,7 +230,7 @@ class LocationTest(APIViewTestCases.APIViewTestCase):
'name': 'Test Location 6',
'slug': 'test-location-6',
'site': sites[1].pk,
'parent': parent_locations[1].pk,
# Omit parent to test uniqueness constraint
'status': LocationStatusChoices.STATUS_PLANNED,
},
]
@@ -2307,6 +2307,6 @@ class VirtualDeviceContextTest(APIViewTestCases.APIViewTestCase):
'device': devices[1].pk,
'status': 'active',
'name': 'VDC 3',
'identifier': 3,
# Omit identifier to test uniqueness constraint
},
]