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:
@@ -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)
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user