fixed logic for tickets in db?

This commit is contained in:
mdipierro
2013-08-09 15:57:27 -05:00
parent b618811d2a
commit 5b94e8f4aa
3 changed files with 24 additions and 15 deletions
+7 -1
View File
@@ -514,11 +514,17 @@ def wsgibase(environ, responder):
# on application error, rollback database
# ##################################################
ticket = e.log(request) or 'unknown'
# log tickets before rollback if not in DB
if not request.tickets_db:
ticket = e.log(request) or 'unknown'
# rollback
if response._custom_rollback:
response._custom_rollback()
else:
BaseAdapter.close_all_instances('rollback')
# if tickets in db, reconnect and store it in db
if request.tickets_db:
ticket = e.log(request) or 'unknown'
http_response = \
HTTP(500, rwthread.routes.error_message_ticket %