1
0
mirror of https://github.com/django/django.git synced 2025-10-28 08:06:09 +00:00

Fixed #21438: makemigrations now detects ManyToManyFields

This commit is contained in:
Andrew Godwin
2013-11-27 15:28:33 +00:00
parent 19b34fbe63
commit 5e63977c0e
2 changed files with 7 additions and 1 deletions

View File

@@ -100,6 +100,10 @@ class ModelState(object):
name, path, args, kwargs = field.deconstruct()
field_class = import_by_path(path)
fields.append((name, field_class(*args, **kwargs)))
for field in model._meta.local_many_to_many:
name, path, args, kwargs = field.deconstruct()
field_class = import_by_path(path)
fields.append((name, field_class(*args, **kwargs)))
# Extract the options
options = {}
for name in DEFAULT_NAMES: