Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
  • Contributor

    hatte das damals absichtlich so gemacht, und danach dann gesehen dass du es anders machst. das war der moment wo ich meinte "wir müssen mal drüber reden wie wir user machen"

  • Author Contributor

    Es ist nur nicht so, als hätte ich mir das so ausgedacht, sondern so war und ist das Schema, mit dem wir kompatibel sein wollen. Du hättest das schon mal aufbringen können, nachdem wir darüber geredet hatten.

  • Contributor

    hatte da nicht mehr dran gedacht. gut dass dus gefixt hast.

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment