Skip to content

Commit

Permalink
disable sending of activation email when creating organization
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-muchiri committed Sep 25, 2024
1 parent 19fcc62 commit 3b27365
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions onadata/apps/api/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,16 +177,9 @@ def create_organization_object(org_name, creator, attrs=None):
)
new_user.save()
try:
registration_profile = RegistrationProfile.objects.create_profile(new_user)
RegistrationProfile.objects.create_profile(new_user)
except IntegrityError as e:
raise ValidationError(_(f"{org_name} already exists")) from e
if email:
site = (
attrs["host"]
if "host" in attrs
else Site.objects.get(pk=settings.SITE_ID).domain
)
registration_profile.send_activation_email(site)
profile = OrganizationProfile(
user=new_user,
name=name,
Expand Down

0 comments on commit 3b27365

Please sign in to comment.