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:
Joseph Schorr 2014-11-20 12:04:53 -05:00
parent cc7bccea4c
commit 8fab3b6d34
2 changed files with 3 additions and 2 deletions

View file

@ -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,