Opened 11 years ago
Closed 11 years ago
#22520 closed Uncategorized (duplicate)
CircularDependencyError when there's a foreign key to a model with PermissionsMixin
Reported by: | no | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | 1.7-beta-2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have the following models in my project. Running makemigration works, but running migrate causes a CircularDependencyError.
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.
Attachments (1)
Change History (2)
by , 11 years ago
Attachment: | circular.tar.gz added |
---|
comment:1 by , 11 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
It seems like it's probably a duplicate of #22325.
Note:
See TracTickets
for help on using tickets.
Minimal test project