summaryrefslogtreecommitdiff
path: root/django/db/models/query_utils.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2010-02-26 13:17:43 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2010-02-26 13:17:43 +0000
commite12b3199d0c01694ca6b09add5e0f27cadffc8ad (patch)
tree4e5eca74ba0e412830f8a5f51020c623564e4ea5 /django/db/models/query_utils.py
parent126ca330e230034081182ec8a4bf1f47260b6cb9 (diff)
Fixed #6191, #11296 -- Modified the admin deletion confirmation page to use the same object collection scheme as the actual deletion. This ensures that all objects that may be deleted are actually deleted, and that cyclic display problems are avoided. Thanks to carljm for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@12598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/query_utils.py')
-rw-r--r--django/db/models/query_utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index 9129d95a0b..c899a846e3 100644
--- a/django/db/models/query_utils.py
+++ b/django/db/models/query_utils.py
@@ -50,7 +50,7 @@ class CollectedObjects(object):
else:
self.blocked = {}
- def add(self, model, pk, obj, parent_model, nullable=False):
+ def add(self, model, pk, obj, parent_model, parent_obj=None, nullable=False):
"""
Adds an item to the container.
@@ -60,6 +60,8 @@ class CollectedObjects(object):
* obj - the object itself.
* parent_model - the model of the parent object that this object was
reached through.
+ * parent_obj - the parent object this object was reached
+ through (not used here, but needed in the API for use elsewhere)
* nullable - should be True if this relation is nullable.
Returns True if the item already existed in the structure and