mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 17:42:23 +00:00
Fix new organizer role
This commit is contained in:
parent
7bd2e1626f
commit
28abf730a2
@ -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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user