Explorar el Código

fixing SQL query

joel
Simon Bowie hace 2 años
padre
commit
261ecbc7aa
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      web/app/tool.py

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

@@ -23,7 +23,7 @@ def get_tools():
tools = Resource.query.filter_by(type='tool')
for key in request.args.keys():
if key == 'practice':
query = 'SELECT * FROM Resource LEFT JOIN Relationship ON Resource.id=Relationship.first_resource_id WHERE Relationship.second_resource_id=' + request.args.get(key) + ';'
query = 'SELECT Resource.* FROM Resource LEFT JOIN Relationship ON Resource.id=Relationship.first_resource_id WHERE Relationship.second_resource_id=' + request.args.get(key) + ';'
tools = db.engine.execute(query)
else:
kwargs = {'type': 'tool', key: request.args.get(key)}

Cargando…
Cancelar
Guardar