#22397: Issues removing M2M field with explicit through model
---------------------------------+------------------------------------
Reporter: melinath | Owner: andrewsg
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
---------------------------------+------------------------------------
Comment (by melinath):
I'm sorry to say that this commit seems to have broken migrations for me
altogether. (Checked with git bisect.)
{{{
$ ./manage.py migrate
Operations to perform:
Synchronize unmigrated apps: floppyforms, sessions, admin, auth,
zenaida, contenttypes
Apply all migrations: brambling, auth
Synchronizing apps without migrations:
Creating tables...
Creating table django_admin_log
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table django_content_type
Creating table django_session
Installing custom SQL...
Installing indexes...
Running migrations:
Applying brambling.0001_initial... OK
Applying
brambling.0002_eventhousing_eventperson_home_housingslot_itemoption_payment_person_persondiscount...Traceback
(most recent call last):
File "./manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File ".../django/django/core/management/__init__.py", line 427, in
execute_from_command_line
utility.execute()
File ".../django/django/core/management/__init__.py", line 419, in
execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File ".../django/django/core/management/base.py", line 288, in
run_from_argv
self.execute(*args, **options.__dict__)
File ".../django/django/core/management/base.py", line 337, in execute
output = self.handle(*args, **options)
File ".../django/django/core/management/commands/migrate.py", line 145,
in handle
executor.migrate(targets, plan, fake=options.get("fake", False))
File ".../django/django/db/migrations/executor.py", line 60, in migrate
self.apply_migration(migration, fake=fake)
File ".../django/django/db/migrations/executor.py", line 88, in
apply_migration
if self.detect_soft_applied(migration):
File ".../django/django/db/migrations/executor.py", line 132, in
detect_soft_applied
apps = project_state.render()
File ".../django/django/db/migrations/state.py", line 63, in render
model=dangling_lookup[0]))
ValueError: Lookup failed for model referenced by field
auth.Permission.content_type: contenttypes.ContentType
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22397#comment:17>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.26d0bcb8559c8d82452b3d07b98a02e8%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.