Skip to content
This repository has been archived by the owner on Jun 15, 2021. It is now read-only.

Commit

Permalink
fix #250: fix an api bug when no cats are selected
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmeneghello committed Jan 5, 2016
1 parent 6b83caa commit 3495bdf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pynab/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ def search(dataset=None):
# get categories
if not cat_ids:
cats = request.query.cat or None
cat_ids = cats.split(',')
if cats:
cat_ids = cats.split(',')

if cat_ids:
query = query.join(Category).filter(Category.id.in_(cat_ids) | Category.parent_id.in_(cat_ids))
Expand Down

0 comments on commit 3495bdf

Please sign in to comment.