From f9904f2409d8fdc314676c624a414c27170c1551 Mon Sep 17 00:00:00 2001 From: Steven Valdez Date: Mon, 29 Apr 2013 21:04:59 -0400 Subject: [PATCH] Fixes for queries on cherrypy compat --- code/main.py | 2 +- code/webcommon.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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()) -- 1.7.9.5