瀏覽代碼

fix filter

David 10 年之前
父節點
當前提交
7e4a73ac57
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      db.py

+ 1 - 1
db.py

@@ -55,7 +55,7 @@ class db():
             #    {"url": {"$regex":".*%s.*"%filter["site"], "$options": 'i' }}
             #    ]
 
-        if "minweight" not in filter or not isinstance(filter["minweight"],int):
+        if "minweight" not in filter or not filter["minweight"].isdigit():
             filter["minweight"]=1
 
         if "category" not in filter or filter["category"]=="-1":