Skip to content

Commit

Permalink
Fix log display logic
Browse files Browse the repository at this point in the history
  • Loading branch information
rixx committed May 7, 2024
1 parent f222a57 commit 1ec9684
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pretalx/common/log_display.py
Expand Up @@ -123,8 +123,8 @@ def default_activitylog_display(sender: Event, activitylog: ActivityLog, **kwarg
message = str(templated_entry)
# Check if all placeholders are present in activitylog.data
placeholders = {v[1] for v in string.Formatter().parse(message) if v[1]}
if placeholders <= set(activitylog.data.keys()):
return message.format(**activitylog.data)
if placeholders <= set(activitylog.json_data.keys()):
return message.format(**activitylog.json_data)
action_type = LOG_ALIASES.get(activitylog.action_type, activitylog.action_type)
return LOG_NAMES.get(action_type)

Expand Down

0 comments on commit 1ec9684

Please sign in to comment.