[Mpuls-commits] r204 - in waska/trunk: . waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 10 16:23:56 CEST 2008


Author: teichmann
Date: 2008-10-10 16:23:55 +0200 (Fri, 10 Oct 2008)
New Revision: 204

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/controllers/evaluate.py
Log:
Fixed issue184


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-10-10 09:48:46 UTC (rev 203)
+++ waska/trunk/ChangeLog.txt	2008-10-10 14:23:55 UTC (rev 204)
@@ -1,5 +1,11 @@
 2008-10-10	Sascha L. Teichmann <sascha.teichmann at intevation.de>
 
+	Fixed issue184
+
+	* waskaweb/controllers/evaluate.py: raise 404 if evaluation is not found.
+
+2008-10-10	Sascha L. Teichmann <sascha.teichmann at intevation.de>
+
 	* waskaweb/templates/start/responsible.mako: removed invalid statemnent
 	  about 'TÜV-Plakette', spelled 'Datenschutz cert GmbH' correctly and
 	  inserted Intevation GmbH as responsible for maintenance.

Modified: waska/trunk/waskaweb/controllers/evaluate.py
===================================================================
--- waska/trunk/waskaweb/controllers/evaluate.py	2008-10-10 09:48:46 UTC (rev 203)
+++ waska/trunk/waskaweb/controllers/evaluate.py	2008-10-10 14:23:55 UTC (rev 204)
@@ -148,6 +148,7 @@
             session['hide_search_option_on_eval'] = False 
             session['CASE_OVERVIEW_SEARCHOPTIONS'] = {}
             session.save()
+        page = None
         try:
             c.eval_id = id
             if id == '0':
@@ -222,13 +223,16 @@
                 c.eval_avg_effort = c.eval_effort 
                 page = render('casemanagement/evaluation/evaluation_result_3.mako')
 
-            form_result = session.get('CASE_OVERVIEW_SEARCHOPTIONS', {})
-            if form_result.has_key('eval_id'):
-                del form_result['eval_id'] # do not fillout eval_id with htmlfill
-            return formencode.htmlfill.render(unicode(page, 'utf-8'),defaults=form_result)
+            if page:
+                form_result = session.get('CASE_OVERVIEW_SEARCHOPTIONS', {})
+                if form_result.has_key('eval_id'):
+                    del form_result['eval_id'] # do not fillout eval_id with htmlfill
+                return formencode.htmlfill.render(unicode(page, 'utf-8'),defaults=form_result)
         except:
             return render('/tests/trace.mako')
 
+        raise HTTPNotFound()
+
     def _export(self, evaluation):
         content = evaluation.export()
         data = paste.fileapp.DataApp(



More information about the Mpuls-commits mailing list