remove unknown ids from lists

This commit is contained in:
j 2016-02-11 22:22:52 +05:30
commit 10e651067c
3 changed files with 17 additions and 3 deletions

View file

@ -132,7 +132,7 @@ class User(db.Model):
'type': 'library'
})
index = 0
for name in peer.info['listorder']:
for name in peer.info.get('listorder', peer.info.get('lists', []).keys()):
lists.append({
'id': '%s:%s' % (self.nickname, name),
'user': self.name,