]> de.git.xonotic.org Git - xonotic/xonstat.git/commitdiff
If we are going to roll back upon exception, we need to open a DBSession at the start.
authorAnt Zucaro <azucaro@gmail.com>
Fri, 28 Oct 2011 00:39:59 +0000 (20:39 -0400)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 28 Oct 2011 00:39:59 +0000 (20:39 -0400)
xonstat/views/submission.py

index 4e54a5e7fa8202e7e6c2b73e83af0b9668359157..b969b8261bb47ba7d693a999eb4ae0000c65955f 100755 (executable)
@@ -456,12 +456,12 @@ def stats_submit(request):
     Entry handler for POST stats submissions.\r
     """\r
     try:\r
+        session = DBSession()\r
+\r
         (idfp, status) = verify_request(request)\r
         if not idfp:\r
             raise Exception("Request is not verified.")\r
 \r
-        session = DBSession()\r
-\r
         (game_meta, players) = parse_body(request)  \r
     \r
         if not has_required_metadata(game_meta):\r