[Mpuls-commits] r2426 - wasko/branches/2.0/mpulsweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Tue Apr 20 11:24:20 CEST 2010
Author: torsten
Date: 2010-04-20 11:24:19 +0200 (Tue, 20 Apr 2010)
New Revision: 2426
Modified:
wasko/branches/2.0/mpulsweb/controllers/case_overview.py
Log:
* mpulsweb/controllers/case_overview.py (parseSearchOptions): Parse
enddate and startdate and add to search options.
Modified: wasko/branches/2.0/mpulsweb/controllers/case_overview.py
===================================================================
--- wasko/branches/2.0/mpulsweb/controllers/case_overview.py 2010-04-20 09:23:00 UTC (rev 2425)
+++ wasko/branches/2.0/mpulsweb/controllers/case_overview.py 2010-04-20 09:24:19 UTC (rev 2426)
@@ -48,7 +48,6 @@
# Phase
if options.has_key('phase'):
for pp in options['phase']:
- log.debug(pp)
# Get phasepart ids for the selected phasepairs. Only if pairs are
# defined.
pairs = g.mpuls_config.get('phases', 'pairs')
@@ -56,6 +55,10 @@
continue
for p in pairs[0].get(str(pp), [-1]):
search_options.append('phase:%s' % p)
+ # Dates
+ if options.has_key('sdate') and options.has_key('edate'):
+ search_options.append('sdate:%s' % options.get('sdate'))
+ search_options.append('edate:%s' % options.get('edate'))
return search_options
@@ -150,13 +153,11 @@
@checkRole(('admin', 'cm', 'pt_dlr'))
def search(self):
- log.debug(request.params)
validator = SearchCaseForm()
c.form_result = {}
c.form_errors = {}
try:
form_result = validator.to_python(request.params)
- log.debug(form_result)
except formencode.Invalid, error:
log.exception(error)
form_result = error.value
More information about the Mpuls-commits
mailing list