Improvements to the fix to #1592. Commit ready to merge.

- Legacy-Id: 8949
This commit is contained in:
Robert Sparks 2015-01-29 20:58:23 +00:00
parent 0c4ef8c8f6
commit 3de9922d87

View file

@ -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):