diff options
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) ) |
