Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.0.X] Fixed a weird intentation glitch in `django/forms/models.py`.…

… Five spaces!?

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 5015860ebf7a49747738d5bab2399553ec7dbe9f 1 parent 91a17a8
@jacobian jacobian authored
Showing with 16 additions and 16 deletions.
  1. +16 −16 django/forms/models.py
View
32 django/forms/models.py
@@ -603,22 +603,22 @@ def save_existing_objects(self, commit=True):
existing_objects[obj.pk] = obj
saved_instances = []
for form in self.initial_forms:
- pk_name = self._pk_field.name
- raw_pk_value = form._raw_value(pk_name)
- pk_value = form.fields[pk_name].clean(raw_pk_value)
- obj = existing_objects[pk_value]
- if self.can_delete:
- raw_delete_value = form._raw_value(DELETION_FIELD_NAME)
- should_delete = form.fields[DELETION_FIELD_NAME].clean(raw_delete_value)
- if should_delete:
- self.deleted_objects.append(obj)
- obj.delete()
- continue
- if form.has_changed():
- self.changed_objects.append((obj, form.changed_data))
- saved_instances.append(self.save_existing(form, obj, commit=commit))
- if not commit:
- self.saved_forms.append(form)
+ pk_name = self._pk_field.name
+ raw_pk_value = form._raw_value(pk_name)
+ pk_value = form.fields[pk_name].clean(raw_pk_value)
+ obj = existing_objects[pk_value]
+ if self.can_delete:
+ raw_delete_value = form._raw_value(DELETION_FIELD_NAME)
+ should_delete = form.fields[DELETION_FIELD_NAME].clean(raw_delete_value)
+ if should_delete:
+ self.deleted_objects.append(obj)
+ obj.delete()
+ continue
+ if form.has_changed():
+ self.changed_objects.append((obj, form.changed_data))
+ saved_instances.append(self.save_existing(form, obj, commit=commit))
+ if not commit:
+ self.saved_forms.append(form)
return saved_instances
def save_new_objects(self, commit=True):

0 comments on commit 5015860

Please sign in to comment.
Something went wrong with that request. Please try again.