Commit ce2dfb56 authored by Julian Rother's avatar Julian Rother
Browse files

Corrected INSERT statement for changelog

The who field is the user id not the name! I did this the right way
when I implemented this. Please be more careful, when you deal with
merge conflicts.
parent 4ccaebfc
......@@ -279,7 +279,8 @@ def edit(prefix="", ignore=[]):
table, id, column = key.split('.', 2)
assert table in tabs
assert column in tabs[table][2]
modify('INSERT INTO changelog ("table",id_value,id_key,field,value_new,value_old,"when",who,executed) VALUES (?,?,?,?,?,(SELECT %s FROM %s WHERE %s = ?),?,?,1)'%(column,tabs[table][0],tabs[table][1]),table,id,tabs[table][1],column,val,id,,session['user']['givenName'])
modify('INSERT INTO changelog (`table`,id_value, id_key, field, value_new, value_old, `when`, who, executed) VALUES (?,?,?,?,?,(SELECT %s FROM %s WHERE %s = ?),?,?,1)'%(column, tabs[table][0], tabs[table][1]),
table, id, tabs[table][1], column, val, id,, session['user']['dbid'])
modify('UPDATE %s SET %s = ?, time_updated = ? WHERE %s = ?'%(tabs[table][0], column, tabs[table][1]), val,, id)
if 'ref' in request.values:
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment