From 3b27365126b2de74c8fc50c3e2d2381116b7d5bc Mon Sep 17 00:00:00 2001 From: Kelvin Muchiri Date: Wed, 25 Sep 2024 10:34:07 +0300 Subject: [PATCH] disable sending of activation email when creating organization --- onadata/apps/api/tools.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/onadata/apps/api/tools.py b/onadata/apps/api/tools.py index 13432c20e3..164ef12a4d 100644 --- a/onadata/apps/api/tools.py +++ b/onadata/apps/api/tools.py @@ -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,