summaryrefslogtreecommitdiff
path: root/django/forms/models.py
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@memset.com>2013-10-22 11:21:07 +0100
committerAlasdair Nicol <alasdair@memset.com>2013-10-23 13:45:03 +0100
commitc3aa2948c6c14862407501290571f858ccf45b07 (patch)
tree6f0812d7db0fe2f5a6bf9e07f20ba7d442ce8789 /django/forms/models.py
parent317040a73b77be8f8210801793b2ce6d1a69301e (diff)
Fixed #21298 -- Fixed E301 pep8 warnings
Diffstat (limited to 'django/forms/models.py')
-rw-r--r--django/forms/models.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/forms/models.py b/django/forms/models.py
index 56e94fe9e7..cb321510c7 100644
--- a/django/forms/models.py
+++ b/django/forms/models.py
@@ -602,6 +602,7 @@ class BaseModelFormSet(BaseFormSet):
"""
if not commit:
self.saved_forms = []
+
def save_m2m():
for form in self.saved_forms:
form.save_m2m()
@@ -754,6 +755,7 @@ class BaseModelFormSet(BaseFormSet):
# data back. Generally, pk.editable should be false, but for some
# reason, auto_created pk fields and AutoField's editable attribute is
# True, so check for that as well.
+
def pk_is_not_editable(pk):
return ((not pk.editable) or (pk.auto_created or isinstance(pk, AutoField))
or (pk.rel and pk.rel.parent_link and pk_is_not_editable(pk.rel.to._meta.pk)))