I have the following model:
employee.py
class Employee(auth_models.AbstractUser, MetadataModel):
user = models.CharField(unique=True, primary_key=True)
first_name = models.CharField(blank=True, null=True)
last_name = models.CharField(blank=True, null=True)
is_deleted = models.BooleanField(default=False)
My settings.py references to Employee model for authentication:
AUTH_USER_MODEL = 'core.Person'
By default, the user can only log in with the AbstractUser model when is_active=True. How can I change this condition so that the authentication is: is_active==True and is_deleted==False preserving the inheritance on AbstractUser in Employee?