From a4d80dfc6fe6aed6d93cb48c86aec586ae5a20f7 Mon Sep 17 00:00:00 2001 From: Ant Zucaro Date: Thu, 27 Oct 2011 20:39:59 -0400 Subject: [PATCH] If we are going to roll back upon exception, we need to open a DBSession at the start. --- xonstat/views/submission.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xonstat/views/submission.py b/xonstat/views/submission.py index 4e54a5e..b969b82 100755 --- a/xonstat/views/submission.py +++ b/xonstat/views/submission.py @@ -456,12 +456,12 @@ def stats_submit(request): Entry handler for POST stats submissions. """ try: + session = DBSession() + (idfp, status) = verify_request(request) if not idfp: raise Exception("Request is not verified.") - session = DBSession() - (game_meta, players) = parse_body(request) if not has_required_metadata(game_meta): -- 2.39.2