1
0
mirror of https://github.com/django/django.git synced 2025-10-26 23:26:08 +00:00

Fixed #24289 -- Reversed usage of Field.many_to_one and one_to_many.

Thanks Carl Meyer and Tim Graham for the reviews and to all involved
in the discussion.
This commit is contained in:
Loic Bistuer
2015-02-14 01:55:36 +07:00
parent 5c995dcfc2
commit 18c0aaa912
8 changed files with 34 additions and 34 deletions

View File

@@ -65,7 +65,7 @@ def get_candidate_relations_to_delete(opts):
# N-N (i.e., many-to-many) relations aren't candidates for deletion.
return (
f for f in candidate_model_fields
if f.auto_created and not f.concrete and (f.one_to_one or f.many_to_one)
if f.auto_created and not f.concrete and (f.one_to_one or f.one_to_many)
)