Merged in [16248] from rjsparks@nostrum.com:

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.
 - Legacy-Id: 16274
Note: SVN reference [16248] has been migrated to Git commit 427d9fe34e
This commit is contained in:
Henrik Levkowetz 2019-06-17 13:08:51 +00:00
commit 2ab2bd09f1

View file

@ -1,4 +1,4 @@
# Copyright The IETF Trust 2015, All Rights Reserved
# Copyright The IETF Trust 2015-2019, All Rights Reserved
from django.db import models
from django.template import Template, Context
@ -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