Skip to content
Snippets Groups Projects
Commit 3e42f4ff authored by Pierre-antoine Comby's avatar Pierre-antoine Comby
Browse files

superusers at creation gets automatically valid registration

parent cde35ea9
No related branches found
No related tags found
1 merge request!107Beta
Pipeline #8596 passed with stages
in 12 minutes and 46 seconds
......@@ -13,4 +13,7 @@ def save_user_profile(instance, created, raw, **_kwargs):
if created and instance.is_active:
from .models import Profile
Profile.objects.get_or_create(user=instance)
if instance.is_superuser:
instance.profile.email_confirmed = True
instance.profile.registration_valid = True
instance.profile.save()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment