Fix createsuperuser

This commit is contained in:
Alexandre Iooss 2019-08-02 21:18:03 +02:00
parent b541f7025c
commit afdb08b926
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02
1 changed files with 2 additions and 0 deletions

View File

@ -135,6 +135,8 @@ class User(AbstractBaseUser):
""" Make User admin """
user_admin_right = Right(user=self, right=self.get_admin_right())
user_admin_right.save()
self.is_staff = True
self.save()
def un_admin(self):
try: