Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0bfae2

Browse files
committed
Merge pull request binux#265 from eromoe/pullrequest
fix dump error while using pymongo
2 parents 96199c4 + a728262 commit f0bfae2

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pyspider/database/mongodb/resultdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def __init__(self, url, database='resultdb'):
2323
self._list_project()
2424

2525
def _parse(self, data):
26+
data['_id'] = str(data['_id'])
2627
if 'result' in data:
2728
data['result'] = json.loads(data['result'])
2829
return data

pyspider/webui/result.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def dump_result(project, _format):
3939
return "no such project.", 404
4040

4141
offset = int(request.args.get('offset', 0))
42-
limit = int(request.args.get('limit', 0)) or None
42+
limit = int(request.args.get('limit', 0))
4343
results = resultdb.select(project, offset=offset, limit=limit)
4444

4545
if _format == 'json':

0 commit comments

Comments
 (0)