mirror of
https://github.com/pretix/pretix.git
synced 2026-09-15 16:34:42 +00:00
Use a defaultdict for log rendering
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
|
from collections import defaultdict
|
||||||
from decimal import Decimal
|
from decimal import Decimal
|
||||||
|
|
||||||
import bleach
|
import bleach
|
||||||
@@ -281,6 +282,7 @@ def pretixcontrol_logentry_display(sender: Event, logentry: LogEntry, **kwargs):
|
|||||||
data['value'] = LazyI18nString(data['value'])
|
data['value'] = LazyI18nString(data['value'])
|
||||||
|
|
||||||
if logentry.action_type in plains:
|
if logentry.action_type in plains:
|
||||||
|
data = defaultdict(lambda: '?', data)
|
||||||
return plains[logentry.action_type].format_map(data)
|
return plains[logentry.action_type].format_map(data)
|
||||||
|
|
||||||
if logentry.action_type.startswith('pretix.event.order.changed'):
|
if logentry.action_type.startswith('pretix.event.order.changed'):
|
||||||
|
|||||||
Reference in New Issue
Block a user