fix
This commit is contained in:
1 parent
cdf83f4d07
commit
3151bf50c2
1 file changed
+1
@@ -29,6 +29,7 @@ class User(AbstractUser):
|
|||||||
)
|
)
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
|
if self.username:
|
||||||
if self.is_superuser:
|
if self.is_superuser:
|
||||||
self.role = RoleChoices.SUPER
|
self.role = RoleChoices.SUPER
|
||||||
super().save(*args, **kwargs)
|
super().save(*args, **kwargs)
|
||||||
|
|||||||
Reference in new issue
Block a user