Fix KeyError in sendmail history

This commit is contained in:
Raphael Michel
2020-02-13 09:22:50 +01:00
parent 34ec11ecfa
commit 80a3063799

View File

@@ -206,10 +206,11 @@ class EmailHistoryView(EventPermissionRequiredMixin, ListView):
status[s] for s in log.pdata['sendto'] status[s] for s in log.pdata['sendto']
] ]
log.pdata['items'] = [ log.pdata['items'] = [
itemcache[i['id']] for i in log.pdata.get('items', []) itemcache.get(i['id'], '?') for i in log.pdata.get('items', [])
] ]
log.pdata['checkin_lists'] = [ log.pdata['checkin_lists'] = [
checkin_list_cache[i['id']] for i in log.pdata.get('checkin_lists', []) if i['id'] in checkin_list_cache checkin_list_cache.get(i['id'], '?')
for i in log.pdata.get('checkin_lists', []) if i['id'] in checkin_list_cache
] ]
if log.pdata.get('subevent'): if log.pdata.get('subevent'):
try: try: