Explorar el Código

adding new publisher filter to get_filter_values

main
Simon Bowie hace 10 meses
padre
commit
2adb213ad4
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      web/app/resources.py

+ 1
- 1
web/app/resources.py Ver fichero

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

Cargando…
Cancelar
Guardar