瀏覽代碼

adding new publisher filter to get_filter_values

main
Simon Bowie 10 月之前
父節點
當前提交
2adb213ad4
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      web/app/resources.py

+ 1
- 1
web/app/resources.py 查看文件

@@ -55,7 +55,7 @@ def delete_resource(resource_id):
# function to get filters for a specific field
def get_filter_values(field, type):
# get field values for filter
field_filter = Resource.query.filter_by(type=type).with_entities(getattr(Resource, field))
field_filter = Resource.query.filter_by(type=type).filter_by(published=True).with_entities(getattr(Resource, field))
# turn SQLAlchemy object into list
field_filter = [i for i, in field_filter]
# split each element on '/' (useful for scriptingLanguage only)

Loading…
取消
儲存