From 3de9922d87607a99219af77423dd0d88ee8618ee Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Thu, 29 Jan 2015 20:58:23 +0000 Subject: [PATCH] Improvements to the fix to #1592. Commit ready to merge. - Legacy-Id: 8949 --- ietf/group/utils.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ietf/group/utils.py b/ietf/group/utils.py index 307dfdcc8..cf07229ae 100644 --- a/ietf/group/utils.py +++ b/ietf/group/utils.py @@ -56,12 +56,18 @@ def get_group_ads_emails(wg): if wg.acronym == 'none': return [] - # Make sure the assigned AD is included (in case that is not one of the area ADs - ad_emails = set([wg.ad_role() and wg.ad_role().email.address]) + ad_emails = set() + if wg.parent and wg.parent.acronym != 'none': # Include the _current_ list of ads for the area! ad_emails.update(get_area_ads_emails(wg.parent)) + # Make sure the assigned AD is included (in case that is not one of the area ADs) + if wg.state.slug=='active': + wg_ad_email = wg.ad_role() and wg.ad_role().email.address + if wg_ad_email: + ad_emails.add(wg_ad_email) + return list(ad_emails) def get_group_chairs_emails(wg):