Removed the IETF chair as a recipient of new IPR disclosures if there is no group or active document to send them to. Fixes #2727. Commit ready for merge.

- Legacy-Id: 16248
This commit is contained in:
Robert Sparks 2019-06-14 18:18:11 +00:00
parent 4986f50c85
commit 427d9fe34e

View file

@ -10,8 +10,6 @@ from ietf.review.models import ReviewTeamSettings
import debug # pyflakes:ignore
from ietf.group.models import Role
def clean_duplicates(addrlist):
address_info = {}
for a in addrlist:
@ -295,7 +293,7 @@ class Recipient(models.Model):
def gather_doc_ipr_group_or_ad(self, **kwargs):
"""A document's group email list if the document is a group document,
otherwise, the document's AD if the document is active, otherwise
the IETF chair"""
nobody (in the past, the default was the IETF chair)"""
addrs=[]
if 'doc' in kwargs:
doc=kwargs['doc']
@ -303,7 +301,7 @@ class Recipient(models.Model):
if doc.ad and doc.get_state_slug('draft')=='active':
addrs.extend(Recipient.objects.get(slug='doc_ad').gather(**kwargs))
else:
addrs.extend(Role.objects.filter(group__acronym='gen',name='ad').values_list('email__address',flat=True))
pass
else:
addrs.extend(Recipient.objects.get(slug='doc_group_mail_list').gather(**kwargs))
return addrs