Quellcode durchsuchen

adding new publisher filter to get_filter_values

main
Simon Bowie vor 10 Monaten
Ursprung
Commit
2adb213ad4
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. +1
    -1
      web/app/resources.py

+ 1
- 1
web/app/resources.py Datei anzeigen

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

Laden…
Abbrechen
Speichern