diff --git a/server.py b/server.py index 6c458ea16181fdaa627ee54870933786e1521313..3c4c19d56b860eb60a3ffa96098773ad1365b3ff 100755 --- a/server.py +++ b/server.py @@ -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,datetime.now(),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, datetime.now(), session['user']['dbid']) modify('UPDATE %s SET %s = ?, time_updated = ? WHERE %s = ?'%(tabs[table][0], column, tabs[table][1]), val, datetime.now(), id) modify('COMMIT') if 'ref' in request.values: