|
@@ -62,9 +62,10 @@ class db():
|
|
|
# {"url": {"$regex":".*%s.*"%filter["site"], "$options": 'i' }}
|
|
# {"url": {"$regex":".*%s.*"%filter["site"], "$options": 'i' }}
|
|
|
# ]
|
|
# ]
|
|
|
|
|
|
|
|
- if "minweight" in filter and filter["minweight"] != "":
|
|
|
|
|
- db_filter["weight"]={"$gt":int(filter["minweight"])}
|
|
|
|
|
|
|
+ if "minweight" not in filter or not isinstance(filter["minweight"],int):
|
|
|
|
|
+ filter["minweight"]=1
|
|
|
|
|
|
|
|
|
|
+ db_filter["weight"]={"$gt":int(filter["minweight"])}
|
|
|
if "keyword" in filter and len(filter["keyword"]) >0:
|
|
if "keyword" in filter and len(filter["keyword"]) >0:
|
|
|
db_filter["kw"]={"$all": filter["keyword"]}
|
|
db_filter["kw"]={"$all": filter["keyword"]}
|
|
|
|
|
|