--- a/swtr.py +++ b/swtr.py @@ -247,8 +247,11 @@ for row in res: d = row d['id'] = str(row['_id']) - if d['who'] in getUsers(): - d['registered'] = True + try: + if d['who'] in getUsers() || d['author'] in getUsers(): + d['registered'] = True + except KeyError: + pass entries.append(d) return entries