From 1d7ab3652efab619916e2fccdf3324203ea7adc5 Mon Sep 17 00:00:00 2001 From: Tom Chapman Date: Fri, 5 Jul 2024 16:31:29 -0700 Subject: [PATCH] add verification token in for rejection email --- met-api/src/met_api/services/email_verification_service.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/met-api/src/met_api/services/email_verification_service.py b/met-api/src/met_api/services/email_verification_service.py index 425451717..0d6c7ba0a 100644 --- a/met-api/src/met_api/services/email_verification_service.py +++ b/met-api/src/met_api/services/email_verification_service.py @@ -68,6 +68,9 @@ def create(cls, email_verification: EmailVerificationSchema, verification_token = uuid.uuid4() EmailVerification.create({**email_verification, 'verification_token': verification_token}, session) + if email_verification.get('type', None) == EmailVerificationType.RejectedComment: + email_verification['verification_token'] = verification_token + # TODO: remove this once email logic is brought over from submission service to here if email_verification.get('type', None) != EmailVerificationType.RejectedComment: cls._send_verification_email(