From 708c3a4df94d383dbbb1ad6209a09e95db8272f2 Mon Sep 17 00:00:00 2001 From: Ole Laursen Date: Fri, 24 Feb 2012 16:55:53 +0000 Subject: [PATCH] Look at intended_std_level instead of looking at the indefinite article when determining document/protocol action status, also avoid putting stuff in a list that has been taken directly by reference from the settings - Legacy-Id: 3963 --- ietf/idrfc/mails.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ietf/idrfc/mails.py b/ietf/idrfc/mails.py index cd9b575b9..cd0eef59f 100644 --- a/ietf/idrfc/mails.py +++ b/ietf/idrfc/mails.py @@ -297,13 +297,14 @@ def generate_approval_mailREDESIGN(request, doc): def generate_approval_mail_approved(request, doc): doc.full_status = full_intended_status(doc.intended_std_level) status = doc.full_status.replace("a ", "").replace("an ", "") - - if "an " in status: - action_type = "Document" - else: + + if doc.intended_std_level_id in ("std", "ds", "ps", "bcp"): action_type = "Protocol" - - cc = settings.DOC_APPROVAL_EMAIL_CC + else: + action_type = "Document" + + cc = [] + cc.extend(settings.DOC_APPROVAL_EMAIL_CC) # the second check catches some area working groups (like # Transport Area Working Group)