소스 검색

check for wrong entries in settings

Davide Alberani 7 년 전
부모
커밋
80e3a30e1f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      ibt2.py

+ 1 - 1
ibt2.py

@@ -556,7 +556,7 @@ class SettingsHandler(BaseHandler):
         if id_ is not None:
             query['_id'] = id_
         res = self.db.query(self.collection, query)
-        res = dict((i.get('_id'), i.get('value')) for i in res if '_id' in i)
+        res = dict((i.get('_id'), i.get('value')) for i in res if '_id' in i and isinstance(i.get('_id'), str))
         if id_ is not None:
             res = {id_: res.get(id_)}
         self.write(res)