Browse Source

adding new publisher filter to get_filter_values

main
Simon Bowie 6 months ago
parent
commit
2adb213ad4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      web/app/resources.py

+ 1
- 1
web/app/resources.py View File

@@ -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…
Cancel
Save