|
|
@@ -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) |