#22520: CircularDependencyError when there's a foreign key to a model with
PermissionsMixin
-------------------------------+------------------------
     Reporter:  Naddiseo       |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Migrations     |    Version:  1.7-beta-2
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+------------------------
 I have the following models in my project. Running makemigration works,
 but running migrate causes a CircularDependencyError.

 {{{
 #!python

 from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
 from django.db import models

 class Employee(AbstractBaseUser, PermissionsMixin):
         USERNAME_FIELD = 'id'

 class ModelA(models.Model):
         person = models.ForeignKey(Employee, blank = True, null = True,
 default = None)

 }}}

 I think this could be related to #22485 and/or #21968 but I'm not sure.
 Test project attached.

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

Reply via email to