forked from CGM_Public/pretix_original
Use a defaultdict for log rendering
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
from collections import defaultdict
|
||||
from decimal import Decimal
|
||||
|
||||
import bleach
|
||||
@@ -281,6 +282,7 @@ def pretixcontrol_logentry_display(sender: Event, logentry: LogEntry, **kwargs):
|
||||
data['value'] = LazyI18nString(data['value'])
|
||||
|
||||
if logentry.action_type in plains:
|
||||
data = defaultdict(lambda: '?', data)
|
||||
return plains[logentry.action_type].format_map(data)
|
||||
|
||||
if logentry.action_type.startswith('pretix.event.order.changed'):
|
||||
|
||||
Reference in New Issue
Block a user