Fix handling of in_collection values

This commit is contained in:
Correl Roush 2021-07-15 22:41:01 -04:00
parent a08a2998a3
commit b9b5badec6

View file

@ -65,7 +65,9 @@ class SearchHandler(tornado.web.RequestHandler):
search, search,
limit=limit + 1, limit=limit + 1,
offset=limit * (page - 1), offset=limit * (page - 1),
in_collection=in_collection, in_collection=in_collection in ("yes", "true")
if in_collection
else None,
) )
has_more = cards and len(cards) > limit has_more = cards and len(cards) > limit
self.set_header("Content-Type", "application/json") self.set_header("Content-Type", "application/json")