Attached is a model file with a custom user model implemented (and set as
the AUTH_MODEL in settings).
When makemigrations is run, three migrations are created. Upon appliance
it fails with the following traceback:
{{{
Traceback (most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/core/management/__init__.py", line 427, in
execute_from_command_line
utility.execute()
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/core/management/__init__.py", line 419, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/core/management/base.py", line 288, in run_from_argv
self.execute(*args, **options.__dict__)
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/core/management/commands/migrate.py", line 103, in handle
plan = executor.migration_plan(targets)
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/executor.py", line 36, in migration_plan
backwards_plan = self.loader.graph.backwards_plan(target)[:-1]
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/graph.py", line 64, in backwards_plan
return self.dfs(node, lambda x: self.dependents.get(x, set()))
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/graph.py", line 119, in dfs
return _dfs(start, get_children, [])
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/graph.py", line 111, in _dfs
results = _dfs(n, get_children, path) + results
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/graph.py", line 111, in _dfs
results = _dfs(n, get_children, path) + results
File "/Users/henrik/dj17b3/venv/lib/python3.4/site-
packages/django/db/migrations/graph.py", line 103, in _dfs
raise CircularDependencyError(path[path.index(start):] + [start])
django.db.migrations.graph.CircularDependencyError: [('accounts',
'0001_initial'), ('accounts', '0001_initial')]
}}}
Tested in Django 1.7b3 (not available to choose in the version list).
Personally I'd consider this a release blocker; the functionality worked
as expected in Django 1.6. I will let you guys decide on the severity
though, obviously.
--
Ticket URL: <https://code.djangoproject.com/ticket/22542>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* status: new => closed
* needs_better_patch: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_docs: => 0
Comment:
Duplicate of #22325
--
Ticket URL: <https://code.djangoproject.com/ticket/22542#comment:1>