]> git.xonotic.org Git - xonotic/xonstat.git/commitdiff
Fix bad namespace which breaks search.
authorAnt Zucaro <azucaro@gmail.com>
Thu, 19 Jan 2012 01:46:43 +0000 (20:46 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Thu, 19 Jan 2012 01:46:43 +0000 (20:46 -0500)
xonstat/models.py
xonstat/views/search.py

index 9925fc74d0d1baeb1821b09ef12901f360f2cdc8..50d0a35209ffff71a6eb8dca09973f78c3274ad5 100755 (executable)
@@ -1,7 +1,7 @@
 import logging
 import math
 import sqlalchemy
-import sqlalchemy.sql.functions as func
+import sqlalchemy.sql.functions as sfunc
 from datetime import timedelta
 from sqlalchemy.orm import mapper
 from sqlalchemy.orm import scoped_session
@@ -91,7 +91,7 @@ class Game(object):
         # we do not have the actual duration of the game, so use the 
         # maximum alivetime of the players instead
         duration = 0
-        for d in session.query(func.max(PlayerGameStat.alivetime)).\
+        for d in session.query(sfunc.max(PlayerGameStat.alivetime)).\
                     filter(PlayerGameStat.game_id==self.game_id).\
                     one():
             duration = d.seconds
index 330a502a57ae1588e9995bc57c90e4ea854d4a2c..6f40984c238bdab340ee8b6e40962d9e3bbf9269 100755 (executable)
@@ -6,7 +6,7 @@ import time
 from pyramid.response import Response
 from sqlalchemy import desc
 from sqlalchemy.orm.exc import MultipleResultsFound, NoResultFound
-from sqlalchemy.sql import func
+from sqlalchemy import func
 from xonstat.models import *
 from xonstat.util import strip_colors, qfont_decode
 from xonstat.util import page_url, html_colors