Skip to content

Commit

Permalink
Merge pull request #126 from Garvolll/master
Browse files Browse the repository at this point in the history
在使用pymongo数据库情况下,接口有count查询字段时返回list为空的bug修复
  • Loading branch information
qiyeboy authored Dec 25, 2017
2 parents 7182fd7 + b387672 commit 1278278
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/MongoHelper.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ def select(self, count=None, conditions=None):
count = 0
if conditions:
conditions = dict(conditions)
if 'count' in conditions:
del conditions['count']
conditions_name = ['types', 'protocol']
for condition_name in conditions_name:
value = conditions.get(condition_name, None)
Expand Down

0 comments on commit 1278278

Please sign in to comment.