Skip to content

Commit

Permalink
rename variable query to query_
Browse files Browse the repository at this point in the history
in order to no longer shadow query from outer scope
  • Loading branch information
prohde committed Aug 2, 2023
1 parent 516f280 commit d16050e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions FedSDM/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,26 @@ def feedback() -> Response:
pred = e['pred']
row = e.getlist('row[]')
columns = e.getlist('columns[]')
query = e['query']
query_ = e['query']
desc = e['desc']
selected_row = {}
for c, v in zip(columns, row):
selected_row[c] = v
print(fed, pred, query, selected_row, desc)
print(fed, pred, query_, selected_row, desc)

user_id = session.get('user_id')

db = get_db()
db.execute(
'INSERT INTO feedbackreport (userID, federationID, issueDesc, issueQuery)'
' VALUES (?, ?, ?, ?)',
(user_id, fed, desc, query)
(user_id, fed, desc, query_)
)
db.commit()
fdb = db.execute(
'SELECT id '
' FROM feedbackreport '
' WHERE userID=' + str(user_id) + ' AND issueDesc = "' + desc + '" AND issueQuery="' + query + '"'
' WHERE userID=' + str(user_id) + ' AND issueDesc = "' + desc + '" AND issueQuery="' + query_ + '"'
).fetchone()
ds_id = fdb['id']
print('Last inserted row selected: ', ds_id)
Expand Down

0 comments on commit d16050e

Please sign in to comment.