#23521: removal of concrete Model from bases doesn't remove it from ModelState
bases
-------------------------------+------------------------
     Reporter:  sir-sigurd     |      Owner:  sir-sigurd
         Type:  Uncategorized  |     Status:  new
    Component:  Uncategorized  |    Version:  1.7
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+------------------------
 Steps to reproduce:

 * add `test` app with `models.py`:
 {{{
 class Thing(models.Model):
     pass


 class SuperThing(Thing):
     pass
 }}}

 * do

 {{{
 manage.py makemigrations test
 }}}


 * change `models.py`:
 {{{
 class SuperThing(models.Model):
     thing_ptr = models.AutoField(primary_key=True)
 }}}

 * do

 {{{
 manage.py makemigrations test
 }}}

 * do it one more time

 {{{
 manage.py makemigrations test
 }}}

 last command results in


 {{{
 django.db.migrations.state.InvalidBasesError: Cannot resolve bases for
 [<ModelState: 'test.SuperThing'>]
 This can happen if you are inheriting models from an app with migrations
 (e.g. contrib.auth)
  in an app with no migrations; see
 https://docs.djangoproject.com/en/1.7/topics/migrations/#dependencies for
 more
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23521>
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/053.1fbcb34b418089a8214832b6bad4fab5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to