#22485: makemigrations fails with dependencies to unmigrated apps -------------------------------------+------------------------------------- Reporter: apollo13 | Owner: nobody Type: Bug | Status: new Component: | Version: master Migrations | Keywords: migrations, Severity: Release | unmigrated, makemigrations blocker | Has patch: 0 Triage Stage: Accepted | Needs tests: 0 Needs documentation: 0 | Easy pickings: 0 Patch needs improvement: 0 | UI/UX: 0 | -------------------------------------+------------------------------------- Download the attached sample project and run ''manage.py makemigrations'': {{{ Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/florian/sources/django.git/django/core/management/__init__.py", line 427, in execute_from_command_line utility.execute() File "/home/florian/sources/django.git/django/core/management/__init__.py", line 419, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/florian/sources/django.git/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, **options.__dict__) File "/home/florian/sources/django.git/django/core/management/base.py", line 337, in execute output = self.handle(*args, **options) File "/home/florian/sources/django.git/django/core/management/commands/makemigrations.py", line 99, in handle changes = autodetector.changes(graph=loader.graph, trim_to_apps=app_labels or None) File "/home/florian/sources/django.git/django/db/migrations/autodetector.py", line 33, in changes changes = self._detect_changes() File "/home/florian/sources/django.git/django/db/migrations/autodetector.py", line 50, in _detect_changes old_apps = self.from_state.render() File "/home/florian/sources/django.git/django/db/migrations/state.py", line 63, in render model=dangling_lookup[0])) ValueError: Lookup failed for model referenced by field migrationtest.Test.user: auth.User
}}} This is caused by https://github.com/django/django/commit/956bd644249337b9467c017aac4eec228dde8c5d (see the comments there) -- not sure if this is the actual cause or rather https://github.com/django/django/commit/2085f53f567f7619ecf3eab93fdacab7a5991a11 due to missing tests. -- Ticket URL: <https://code.djangoproject.com/ticket/22485> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/051.f6876db2d027477704522a5007a66a57%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.