diff options
| author | Simon Charette <charette.s@gmail.com> | 2015-10-05 13:26:14 -0400 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2015-10-12 12:14:26 -0400 |
| commit | 211486f3ab5602cdc332f03cd03fad3cb929d154 (patch) | |
| tree | 1613f8cde14f3d4bbb133df153c662dc5cc61633 /django | |
| parent | 8bdfabed6563f2ae136ad43e05bb254c9c15811a (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.py | 2 |
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) ) |
