[Mpuls-commits] r409 - wasko/trunk/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 18 19:07:52 CET 2009


Author: torsten
Date: 2009-03-18 19:07:50 +0100 (Wed, 18 Mar 2009)
New Revision: 409

Modified:
   wasko/trunk/waskaweb/controllers/caselifetime.py
Log:
Added missing exception handling


Modified: wasko/trunk/waskaweb/controllers/caselifetime.py
===================================================================
--- wasko/trunk/waskaweb/controllers/caselifetime.py	2009-03-18 18:05:22 UTC (rev 408)
+++ wasko/trunk/waskaweb/controllers/caselifetime.py	2009-03-18 18:07:50 UTC (rev 409)
@@ -395,21 +395,25 @@
                 form_result['cm2c_t'] += "\r\n\r\n" + form_result.get('anmerkungen', '')
             else:
                 form_result['cm2c_t'] = form_result.get('anmerkungen', '')
-            c.casedata.setData(form_result)
+            try:
+                c.casedata.setData(form_result)
+                if form_result.get('cm_neuauf_genehm') == '1':
+                    try:
+                        c.casedata.setData(form_result, do_write = False)
+                        return self.renew(0)
+                    except DataSaveException, err:
+                        form_result_1, form_errors = h.toErrorDicts(err.errors)
+                else:
+                    create_logbook(header='Neuaufnahme', text='Für den Fall wurde eine nicht genehmigte Neuaufnahme des Integrationsprozess dokumentiert.')
+            except DataSaveException, err:
+                form_result_1, form_errors = h.toErrorDicts(err.errors)
 
-            if form_result.get('cm_neuauf_genehm') == '1':
-                try:
-                    c.casedata.setData(form_result, do_write = False)
-                    return self.renew(0)
-                except DataSaveException, err:
-                    form_result_1, form_errors = h.toErrorDicts(err.errors)
-            else:
-                create_logbook(header='Neuaufnahme', text='Für den Fall wurde eine nicht genehmigte Neuaufnahme des Integrationsprozess dokumentiert.')
-
-
         except formencode.Invalid, error:
             print error
             form_result = error.value
             form_errors = error.error_dict or {}
 
-        return self.index()
+        c.form_result = form_result
+        c.form_errors  = form_errors
+        return render('/caselifetime/overview.mako')
+



More information about the Mpuls-commits mailing list