Make sure to switch the context back to LogEntry and make sure to only include the performer if actually present
This commit is contained in:
parent
cc7bccea4c
commit
8fab3b6d34
2 changed files with 3 additions and 2 deletions
|
@ -19,7 +19,7 @@ def log_view(log):
|
|||
'datetime': format_date(log.datetime),
|
||||
}
|
||||
|
||||
if log.performer:
|
||||
if log.performer and log.performer.username:
|
||||
view['performer'] = {
|
||||
'kind': 'user',
|
||||
'name': log.performer.username,
|
||||
|
|
Reference in a new issue