From 5e68fec29ecf1ea641ca5bb419c10beefe0faedf Mon Sep 17 00:00:00 2001 From: "M.Ravi" Date: Tue, 13 Feb 2018 02:42:40 +0100 Subject: [PATCH] Add is_staff setter method for CustomUser --- membership/models.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/membership/models.py b/membership/models.py index 559b0276..b3cbcd91 100644 --- a/membership/models.py +++ b/membership/models.py @@ -179,6 +179,10 @@ class CustomUser(AbstractBaseUser, PermissionsMixin): # Simplest possible answer: All admins are staff return self.is_admin + @is_staff.setter + def is_staff(self, value): + self._is_staff = value + class StripeCustomer(models.Model): user = models.OneToOneField(CustomUser)