[Django] #22520: CircularDependencyError when there's a foreign key to a model with PermissionsMixin

14 views
Skip to first unread message

Django

unread,
Apr 25, 2014, 4:52:48 PM4/25/14
to django-...@googlegroups.com
#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.

Django

unread,
Apr 29, 2014, 6:36:06 PM4/29/14
to django-...@googlegroups.com
#22520: CircularDependencyError when there's a foreign key to a model with
PermissionsMixin
-------------------------------+--------------------------------------
Reporter: Naddiseo | Owner: nobody
Type: Uncategorized | Status: closed
Component: Migrations | Version: 1.7-beta-2
Severity: Normal | Resolution: duplicate
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timo):

* status: new => closed
* needs_docs: => 0
* resolution: => duplicate
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

It seems like it's probably a duplicate of #22325.

--
Ticket URL: <https://code.djangoproject.com/ticket/22520#comment:1>

Reply all
Reply to author
Forward
0 new messages