1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

Refs #24377 -- Added assertions for model inlines with primary key that has a default.

This ensures that a model field default is ignored.
This commit is contained in:
Neeraj Kumar 2023-07-07 08:12:25 +02:00 committed by Mariusz Felisiak
parent f64fd47a76
commit b91d62cca0

View File

@ -43,6 +43,8 @@ class InlineFormsetTests(TestCase):
} }
) )
self.assertTrue(formset.is_valid()) self.assertTrue(formset.is_valid())
self.assertIsNone(formset.instance.uuid)
self.assertIsNone(formset.forms[0].instance.parent_id)
def test_inlineformset_factory_nulls_default_pks_uuid_parent_auto_child(self): def test_inlineformset_factory_nulls_default_pks_uuid_parent_auto_child(self):
""" """