Added a missing guard against attribute access on None.

- Legacy-Id: 17852
This commit is contained in:
Henrik Levkowetz 2020-05-20 10:28:09 +00:00
parent b88a9ccae0
commit cd7eeb238f

View file

@ -84,7 +84,7 @@ class Recipient(models.Model):
addrs = []
if 'doc' in kwargs:
doc=kwargs['doc']
if doc.group.features.acts_like_wg:
if doc.group and doc.group.features.acts_like_wg:
if doc.group.list_email:
addrs.append(doc.group.list_email)
return addrs