username might be undefined
This commit is contained in:
parent
dc65b74389
commit
635e718708
1 changed files with 1 additions and 1 deletions
|
@ -423,7 +423,7 @@ class Changelog(db.Model):
|
||||||
if len(peer_id) == 16:
|
if len(peer_id) == 16:
|
||||||
peer = User.get(peer_id)
|
peer = User.get(peer_id)
|
||||||
if peer:
|
if peer:
|
||||||
username = peer.json()['username']
|
username = peer.json().get('username', 'anonymous')
|
||||||
action[peer_id] = [revision, timestamp, username]
|
action[peer_id] = [revision, timestamp, username]
|
||||||
if peer_id in changes.get('removepeer', []):
|
if peer_id in changes.get('removepeer', []):
|
||||||
del changes['removepeer'][peer_id]
|
del changes['removepeer'][peer_id]
|
||||||
|
|
Loading…
Reference in a new issue