workflow: remove aggregation email if can not send it (#19389)
This commit is contained in:
parent
a1966769a3
commit
a909983795
|
@ -92,12 +92,15 @@ def send_aggregation_emails(publisher):
|
|||
|
||||
cache = {}
|
||||
for aggregate_id in AggregationEmail.keys():
|
||||
role = Role.get(aggregate_id)
|
||||
if not role.emails:
|
||||
continue
|
||||
|
||||
aggregate = AggregationEmail.get(aggregate_id)
|
||||
aggregate.remove_self()
|
||||
|
||||
try:
|
||||
role = Role.get(aggregate_id)
|
||||
except KeyError:
|
||||
continue
|
||||
if not role.emails:
|
||||
continue
|
||||
if not aggregate.items:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in New Issue