From 9f63a9d4de0fe2b2eeea8f3008e603c6312d6e41 Mon Sep 17 00:00:00 2001 From: jebus Date: Thu, 29 Jan 2026 20:24:11 +1300 Subject: [PATCH] [Fix] Fixed ObjectDoesNotExist for send_registration_mail, fixed duplicate mail sending (#312) Co-authored-by: Tim Lorsbach Reviewed-on: https://git.envipath.com/enviPath/enviPy/pulls/312 --- epdb/logic.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/epdb/logic.py b/epdb/logic.py index 19d872e7..edd84a2f 100644 --- a/epdb/logic.py +++ b/epdb/logic.py @@ -194,8 +194,6 @@ class UserManager(object): if clean_username != username or clean_email != email: # This will be caught by the try in view.py/register raise ValueError("Invalid username or password") - # avoid circular import :S - from .tasks import send_registration_mail extra_fields = {"is_active": not s.ADMIN_APPROVAL_REQUIRED} @@ -214,10 +212,6 @@ class UserManager(object): u.default_package = p u.save() - if not u.is_active: - # send email for verification - send_registration_mail.delay(u.pk) - if set_setting: u.default_setting = Setting.objects.get(global_default=True) u.save()