{{{
#!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.
* 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>