1
0
mirror of https://gitlab.crans.org/mediatek/med.git synced 2024-12-24 18:22:24 +00:00

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

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: