From e3b97dd7362b929deb3f2f3e36d069f7513720a2 Mon Sep 17 00:00:00 2001 From: Neeraj Kumar Date: Tue, 27 Sep 2022 22:04:11 +0530 Subject: [PATCH] Updated comment on tests --- tests/model_formsets/test_uuid.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/model_formsets/test_uuid.py b/tests/model_formsets/test_uuid.py index 3f437fd313..6a8ad1977d 100644 --- a/tests/model_formsets/test_uuid.py +++ b/tests/model_formsets/test_uuid.py @@ -91,6 +91,10 @@ class InlineFormsetTests(TestCase): ParentWithUUIDAlternateKey, ChildRelatedViaAK, fields="__all__" ) formset = FormSet() + + # When Child model relation to Parent model UUIDField but this UUIDField + # is not primary key so this UUIDField initial value shouldn't be None, + # Otherwise it'll generate Integrity error on saving parent model data. self.assertIsNotNone(formset.forms[0].fields["parent"].initial) def test_inlineformset_factory_nulls_default_pks_alternate_key_with_child(self):