From: Ant Zucaro Date: Fri, 28 Oct 2011 00:39:59 +0000 (-0400) Subject: If we are going to roll back upon exception, we need to open a DBSession at the start. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4d80dfc6fe6aed6d93cb48c86aec586ae5a20f7;p=xonotic%2Fxonstat.git If we are going to roll back upon exception, we need to open a DBSession at the start. --- 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):