fix
This commit is contained in:
@@ -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