summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-10-05 13:26:14 -0400
committerSimon Charette <charette.s@gmail.com>2015-10-12 12:14:26 -0400
commit211486f3ab5602cdc332f03cd03fad3cb929d154 (patch)
tree1613f8cde14f3d4bbb133df153c662dc5cc61633 /django
parent8bdfabed6563f2ae136ad43e05bb254c9c15811a (diff)
Fixed #23076, #25505 -- Fixed deletion of intermediate proxy models.
Thanks to James Murty for his work on an alternate patch.
Diffstat (limited to 'django')
-rw-r--r--django/db/models/deletion.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/deletion.py b/django/db/models/deletion.py
index 831e3c03db..76a2d35890 100644
--- a/django/db/models/deletion.py
+++ b/django/db/models/deletion.py
@@ -55,7 +55,7 @@ def get_candidate_relations_to_delete(opts):
# The candidate relations are the ones that come from N-1 and 1-1 relations.
# N-N (i.e., many-to-many) relations aren't candidates for deletion.
return (
- f for f in opts.get_fields(include_hidden=True)
+ f for f in opts.concrete_model._meta.get_fields(include_hidden=True)
if f.auto_created and not f.concrete and (f.one_to_one or f.one_to_many)
)