From 0da0165ce28f1fc343d76a4c4fd99658abb730f7 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Thu, 21 Jan 2021 22:54:23 +0100 Subject: [PATCH] Admins are superuser --- apps/registration/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/registration/views.py b/apps/registration/views.py index e8c621f..60d7509 100644 --- a/apps/registration/views.py +++ b/apps/registration/views.py @@ -136,6 +136,10 @@ class AddOrganizerView(VolunteerMixin, CreateView): domain=site.domain)) registration.user.email_user(subject, message, html_message=html) + if registration.is_admin: + registration.user.is_superuser = True + registration.user.save() + return ret def get_success_url(self):