diff roundup/cgi/templating.py @ 5319:62de601bdf6f

Fix commits although a Reject exception is raised Fix the problem that changes are committed to the database (due to commits to otk handling) even when a Reject exception occurs. The fix implements separate database connections for otk/session handling and normal database operation.
author Ralf Schlatterbeck <rsc@runtux.com>
date Fri, 20 Apr 2018 18:46:28 +0200
parents 32f95ec6bd8e
children 7c7f3faa5e10
line wrap: on
line diff
--- a/roundup/cgi/templating.py	Thu Apr 19 20:01:43 2018 +0200
+++ b/roundup/cgi/templating.py	Fri Apr 20 18:46:28 2018 +0200
@@ -104,7 +104,7 @@
     otks.set(key, uid=client.db.getuid(),
              sid=client.session_api._sid,
              __timestamp=ts )
-    client.db.commit()
+    otks.commit()
     return key
 
 ### templating

Roundup Issue Tracker: http://roundup-tracker.org/