浏览代码

fixing SQL query

joel
Simon Bowie 2 年前
父节点
当前提交
261ecbc7aa
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. +1
    -1
      web/app/tool.py

+ 1
- 1
web/app/tool.py 查看文件

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

正在加载...
取消
保存