From 28abf730a21a51c4137145c693c79197e58a4ddf Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 5 May 2020 18:17:48 +0200 Subject: [PATCH] Fix new organizer role --- apps/tournament/forms.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/tournament/forms.py b/apps/tournament/forms.py index a61f469..7c51f15 100644 --- a/apps/tournament/forms.py +++ b/apps/tournament/forms.py @@ -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)