Messages might not have an author
Fixes a KeyError in that case. Change-Id: If12ba5ab30d926a8614e86617f322dccd5afcda7
This commit is contained in:
parent
1b9094ab7d
commit
62dd4d9a07
@ -222,7 +222,7 @@ class SyncChangeTask(Task):
|
|||||||
created = dateutil.parser.parse(remote_message['date'])
|
created = dateutil.parser.parse(remote_message['date'])
|
||||||
if 'author' in remote_message:
|
if 'author' in remote_message:
|
||||||
author_name = remote_message['author']['name']
|
author_name = remote_message['author']['name']
|
||||||
if remote_message['author']['username'] != app.config.username:
|
if remote_message['author'].get('username') != app.config.username:
|
||||||
new_message = True
|
new_message = True
|
||||||
else:
|
else:
|
||||||
author_name = 'Gerrit Code Review'
|
author_name = 'Gerrit Code Review'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user