summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorJacob Kaplan-Moss <jacob@jacobian.org>2009-04-03 20:03:46 +0000
committerJacob Kaplan-Moss <jacob@jacobian.org>2009-04-03 20:03:46 +0000
commitffe8994014b891cb50d3ac6a27d8853698dec9c8 (patch)
treea45521bd0709e596c14c7f5595261164278bbe91 /django
parent595c092a293396eab80c6da8654f6705a28c7431 (diff)
Fixed #10522: accept tuples in `generic_inlineformset_factor(exclude)`. Thanks, mk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10375 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/contenttypes/generic.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/contrib/contenttypes/generic.py b/django/contrib/contenttypes/generic.py
index 0be1de6e63..adc245bb75 100644
--- a/django/contrib/contenttypes/generic.py
+++ b/django/contrib/contenttypes/generic.py
@@ -355,6 +355,7 @@ def generic_inlineformset_factory(model, form=ModelForm,
raise Exception("fk_name '%s' is not a ForeignKey to ContentType" % ct_field)
fk_field = opts.get_field(fk_field) # let the exception propagate
if exclude is not None:
+ exclude = list(exclude)
exclude.extend([ct_field.name, fk_field.name])
else:
exclude = [ct_field.name, fk_field.name]