[Mpuls-commits] r4464 - base/trunk/mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Dec 29 14:53:13 CET 2010
Author: torsten
Date: 2010-12-29 14:53:12 +0100 (Wed, 29 Dec 2010)
New Revision: 4464
Modified:
base/trunk/mpulsweb/model/agency.py
Log:
* mpulsweb/model/agency.py (MpulsAgencyOverview.search): Set attribute
"sql_where". The sql-where attribute includes the where part of the
sql query on the agency overview page. In contrast to the case
overview it is not enough to save the ids of the agencys as within a
agency the included cases are filtered with the parameters saved in
sql_where.
Modified: base/trunk/mpulsweb/model/agency.py
===================================================================
--- base/trunk/mpulsweb/model/agency.py 2010-12-29 13:00:19 UTC (rev 4463)
+++ base/trunk/mpulsweb/model/agency.py 2010-12-29 13:53:12 UTC (rev 4464)
@@ -155,9 +155,11 @@
def __init__(self):
self.ds_list = []
+ self.sql_where = None
def search(self, search_str=None):
self.ds_list = []
+ self.sql_where = g.eval_search.get_where(g.eval_search._get_options(search_str))
result = g.eval_search.perform(search_str)
factory = MpulsAgencyFactory(g.agency)
for row in result:
@@ -170,3 +172,6 @@
def getDatasets(self):
return self.ds_list
+
+ def getWhereSQL(self):
+ return self.sql_where
More information about the Mpuls-commits
mailing list