[Mpuls-commits] r1060 - wasko/branches/2.0/waskaweb/controllers

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Feb 1 14:25:21 CET 2010


Author: torsten
Date: 2010-02-01 14:25:20 +0100 (Mon, 01 Feb 2010)
New Revision: 1060

Modified:
   wasko/branches/2.0/waskaweb/controllers/case.py
Log:
* waskaweb/controllers/case.py (CaseController.createNewLogbookEntry): 
Deleted. Not called from anywhere now.


Modified: wasko/branches/2.0/waskaweb/controllers/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/controllers/case.py	2010-02-01 13:24:02 UTC (rev 1059)
+++ wasko/branches/2.0/waskaweb/controllers/case.py	2010-02-01 13:25:20 UTC (rev 1060)
@@ -876,47 +876,6 @@
                                           errors=c.form_errors)
 
     @checkRole('cm_ka')
-    def createNewLogbookEntry(self):
-        errors = []
-        checker = LogbookEntryChecker(request.params)
-        validator = CreateLogbookForm()
-        c.form_errors = {}
-        c.form_result = {}
-
-        try:
-            c.ds_id = session['case'].id
-            form_result = validator.to_python(request.params)
-        except formencode.Invalid, error:
-            c.form_result = error.value
-            c.form_errors = error.error_dict or {}
-            form = render('/logbook/new.mako')
-            return formencode.htmlfill.render(unicode(form, 'utf-8'),
-                                              defaults=c.form_result,
-                                              auto_insert_errors=False,
-                                              errors=c.form_errors)
-
-        #if checker.hasErrors():
-        #    c.ds_id           = session['case'].id
-        #    c.entry           = checker.getLogbookEntry()
-        #    c.form_errors     = checker.getErrors()
-
-        try:
-            log.debug("New Logbook entry from case %s" % checker.getCaseId())
-            logbook = Logbook(checker.getCaseId())
-            logbook.addEntry(checker.getLogbookEntry())
-            logbook.store(session['USER_AUTHORIZED'].id)
-            c.url_ok = "/case/logbook/%s" % str(session['case'].id)
-            c.success_for = CREATE_LOGBOOK_ENTRY_SUCCESS
-            c.success_text = CREATE_LOGBOOK_ENTRY_SUCCESS_TEXT
-            return render('/logbook/dialogs/success_create_logbook_entry.mako')
-        except:
-            traceback.print_exc(file=sys.stderr)
-            c.failed_for = LOGBOOK_ENTRY_CREATE_FAILED
-            c.failed_text = LOGBOOK_ENTRY_CREATE_FAILED_TEXT
-            c.url_ok = "/case/logbook/%s" % str(session['case'].id)
-            return render('/logbook/dialogs/failed_create_logbook_entry.mako')
-
-    @checkRole('cm_ka')
     def saveLogbookEntry(self):
         params = request.params
         id = self._checkInt(params.getone('id'))



More information about the Mpuls-commits mailing list