Add is_staff setter method for CustomUser

This commit is contained in:
M.Ravi 2018-02-13 02:42:40 +01:00
parent 6a9232851a
commit 5e68fec29e

View file

@ -179,6 +179,10 @@ class CustomUser(AbstractBaseUser, PermissionsMixin):
# Simplest possible answer: All admins are staff # Simplest possible answer: All admins are staff
return self.is_admin return self.is_admin
@is_staff.setter
def is_staff(self, value):
self._is_staff = value
class StripeCustomer(models.Model): class StripeCustomer(models.Model):
user = models.OneToOneField(CustomUser) user = models.OneToOneField(CustomUser)