Improvements based on sanity checking
- Legacy-Id: 10008
This commit is contained in:
parent
ad444bd0bc
commit
ecad71eb82
|
@ -27,7 +27,7 @@ def make_recipients(apps):
|
|||
|
||||
rc(slug='doc_authors',
|
||||
desc="The document's authors",
|
||||
template='{{doc.name}}@ietf.org')
|
||||
template='{% if doc.type_id == "draft" %}{{doc.name}}@ietf.org{% endif %}')
|
||||
|
||||
rc(slug='doc_notify',
|
||||
desc="The addresses in the document's notify field",
|
||||
|
|
|
@ -30,10 +30,11 @@ class Recipient(models.Model):
|
|||
if hasattr(self,'gather_%s'%self.slug):
|
||||
retval.extend(eval('self.gather_%s(**kwargs)'%self.slug))
|
||||
if self.template:
|
||||
rendering = Template(self.template).render(Context(kwargs))
|
||||
rendering = Template('{%% autoescape off %%}%s{%% endautoescape %%}'%self.template).render(Context(kwargs))
|
||||
if rendering:
|
||||
retval.extend(rendering.split(','))
|
||||
retval.extend([x.strip() for x in rendering.split(',')])
|
||||
|
||||
retval = list(set(retval))
|
||||
return retval
|
||||
|
||||
def gather_doc_group_chairs(self, **kwargs):
|
||||
|
|
|
@ -17,4 +17,4 @@ def gather_addresses(slug,**kwargs):
|
|||
for recipient in mailtoken.recipients.all():
|
||||
addrs.extend(recipient.gather(**kwargs))
|
||||
|
||||
return addrs
|
||||
return list(set(addrs))
|
||||
|
|
Loading…
Reference in a new issue