Closes #17761: Store empty CharField choices as null

This commit is contained in:
Jeremy Stretch
2024-10-18 16:55:58 -04:00
parent 75270c1aef
commit ef1fdf0a01
23 changed files with 622 additions and 25 deletions

View File

@@ -871,7 +871,6 @@ class RackTestCase(TestCase, ChangeLoggedFilterSetTests):
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)
def test_outer_unit(self):
self.assertEqual(Rack.objects.filter(outer_unit__isnull=False).count(), 5)
params = {'outer_unit': RackDimensionUnitChoices.UNIT_MILLIMETER}
self.assertEqual(self.filterset(params, self.queryset).qs.count(), 2)

View File

@@ -592,7 +592,7 @@ class DeviceTypeTestCase(
'part_number': '123ABC',
'u_height': 2,
'is_full_depth': True,
'subdevice_role': '', # CharField
'subdevice_role': None,
'comments': 'Some comments',
'tags': [t.pk for t in tags],
}