Filter out Library categories from the list returned

This commit is contained in:
Kelly McDonald 2021-07-08 08:57:40 -04:00
parent dce1d86e93
commit 79c69037dd
1 changed files with 2 additions and 1 deletions

View File

@ -242,7 +242,8 @@ class StudyService(object):
def get_categories():
"""Returns a list of category objects, in the correct order."""
cat_models = db.session.query(WorkflowSpecCategoryModel) \
.order_by(WorkflowSpecCategoryModel.display_order).all()
.order_by(WorkflowSpecCategoryModel.display_order) \
.filter((WorkflowSpecCategoryModel.library == None)|(WorkflowSpecCategoryModel.library ==False)).all()
categories = []
for cat_model in cat_models:
categories.append(Category(cat_model))