Admins are superuser
This commit is contained in:
parent
214d422ee2
commit
0da0165ce2
|
@ -136,6 +136,10 @@ class AddOrganizerView(VolunteerMixin, CreateView):
|
||||||
domain=site.domain))
|
domain=site.domain))
|
||||||
registration.user.email_user(subject, message, html_message=html)
|
registration.user.email_user(subject, message, html_message=html)
|
||||||
|
|
||||||
|
if registration.is_admin:
|
||||||
|
registration.user.is_superuser = True
|
||||||
|
registration.user.save()
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
|
|
Loading…
Reference in New Issue