[fix] pep8

This commit is contained in:
Adam Tauber 2021-07-05 19:57:53 +02:00
parent 198aad43e0
commit a8988885a5
1 changed files with 3 additions and 3 deletions

View File

@ -50,12 +50,12 @@ def search(query, params):
else:
q = {'$regex': re.compile('.*{0}.*'.format(re.escape(query)), re.I | re.M)}
results = _client.find({key: q})\
.skip((params['pageno']-1)*results_per_page)\
.limit(results_per_page)
.skip((params['pageno'] - 1) * results_per_page)\
.limit(results_per_page)
ret.append({'number_of_results': results.count()})
for r in results:
del(r['_id'])
r = {str(k):str(v) for k,v in r.items()}
r = {str(k): str(v) for k, v in r.items()}
r['template'] = result_template
ret.append(r)
return ret