summaryrefslogtreecommitdiff
path: root/django/forms
diff options
context:
space:
mode:
authorClifford Gama <cliffygamy@gmail.com>2025-08-21 18:28:30 +0200
committerGitHub <noreply@github.com>2025-08-21 13:28:30 -0300
commitdd15f7dabb45eb9657c1809da58d786429faf3ac (patch)
treee5ddaae8c113c680b38a809a6ca556e6e42fa43f /django/forms
parentd6a8e5f5e1129d78e6ad40c66c6282ab55be8b61 (diff)
Clarified "inline foreign key" to avoid confusion with generated fields in django/forms/models.py.
Diffstat (limited to 'django/forms')
-rw-r--r--django/forms/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 7fe803624e..4c7db27360 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -1134,8 +1134,8 @@ class BaseInlineFormSet(BaseModelFormSet):
self.unique_fields = {self.fk.name}
super().__init__(data, files, prefix=prefix, queryset=qs, **kwargs)
- # Add the generated field to form._meta.fields if it's defined to make
- # sure validation isn't skipped on that field.
+ # Add the inline foreign key field to form._meta.fields if it's defined
+ # to make sure validation isn't skipped on that field.
if self.form._meta.fields and self.fk.name not in self.form._meta.fields:
if isinstance(self.form._meta.fields, tuple):
self.form._meta.fields = list(self.form._meta.fields)