Fixes for queries on cherrypy compat
authorSteven Valdez <dvorak42@mit.edu>
Tue, 30 Apr 2013 01:04:59 +0000 (21:04 -0400)
committerAdam Glasgall <adam@crossproduct.net>
Tue, 21 May 2013 00:50:59 +0000 (20:50 -0400)
code/main.py
code/webcommon.py

index e5722fa..b443640 100755 (executable)
@@ -286,7 +286,7 @@ console will suffer artifacts.
                                           machine_id=machine_id).machine
             d = infoDict(cherrypy.request.login, cherrypy.request.state, machine)
             return d
-        index = info
+        index = list
 
         @cherrypy.expose
         @cherrypy.tools.mako(filename="/info.mako")
index 7410523..0697a53 100644 (file)
@@ -25,9 +25,9 @@ class State(object):
 
     def getMachines(self):
         if self.isadmin:
-            return Machine.query().all()
+            return Machine.query.all()
         else:
-            return Machine.query().join('acl').filter_by(user=self.username)
+            return Machine.query.join('acl').filter_by(user=self.username)
 
     machines = cachedproperty(getMachines)
     xmlist_raw = cachedproperty(lambda self: controls.getList())