1
0
mirror of https://gitlab.com/animath/si/plateforme.git synced 2024-12-25 05:42:23 +00:00

Fix new organizer role

This commit is contained in:
Yohann D'ANELLO 2020-05-05 18:17:48 +02:00
parent 7bd2e1626f
commit 28abf730a2

View File

@ -56,9 +56,8 @@ class OrganizerForm(forms.ModelForm):
def save(self, commit=True):
user = self.instance
print(user)
print(user.pk)
user.role = '0admin' if user.is_superuser else '1organizer'
user.save()
super().save(commit)