Ignore Account.is_staff kwarg (auth.AbstractBaseUser)
This commit is contained in:
parent
14fbd98e33
commit
08a76a8de4
|
@ -52,6 +52,11 @@ class Account(auth.AbstractBaseUser):
|
|||
USERNAME_FIELD = 'username'
|
||||
REQUIRED_FIELDS = ['email']
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
# ignore `is_staff` kwarg because is handled with `is_superuser`
|
||||
kwargs.pop('is_staff', None)
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
|
Loading…
Reference in New Issue