From: Steven Valdez Date: Tue, 30 Apr 2013 01:04:59 +0000 (-0400) Subject: Fixes for queries on cherrypy compat X-Git-Tag: 0.1.33~15 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/f9904f2409d8fdc314676c624a414c27170c1551?ds=sidebyside;hp=9dd8549018d758eccc9768afb4049de2945d2616 Fixes for queries on cherrypy compat --- diff --git a/code/main.py b/code/main.py index e5722fa..b443640 100755 --- a/code/main.py +++ b/code/main.py @@ -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") diff --git a/code/webcommon.py b/code/webcommon.py index 7410523..0697a53 100644 --- a/code/webcommon.py +++ b/code/webcommon.py @@ -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())