[Mpuls-commits] r5251 - in base/trunk: . mpulsweb/model
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Fri Aug 19 17:43:05 CEST 2011
Author: bh
Date: 2011-08-19 17:43:03 +0200 (Fri, 19 Aug 2011)
New Revision: 5251
Modified:
base/trunk/ChangeLog
base/trunk/mpulsweb/model/case.py
Log:
* mpulsweb/model/case.py (MpulsCase.delete): Simplify the
implementation and remove the exception handlers. The callers can
deal with the exceptions now.
Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog 2011-08-19 15:33:49 UTC (rev 5250)
+++ base/trunk/ChangeLog 2011-08-19 15:43:03 UTC (rev 5251)
@@ -1,5 +1,11 @@
2011-08-19 Bernhard Herzog <bh at intevation.de>
+ * mpulsweb/model/case.py (MpulsCase.delete): Simplify the
+ implementation and remove the exception handlers. The callers can
+ deal with the exceptions now.
+
+2011-08-19 Bernhard Herzog <bh at intevation.de>
+
* mpulsweb/controllers/case.py (CaseController.delete): Log
exceptions that happen in _do_delete_case
Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py 2011-08-19 15:33:49 UTC (rev 5250)
+++ base/trunk/mpulsweb/model/case.py 2011-08-19 15:43:03 UTC (rev 5251)
@@ -997,14 +997,10 @@
self.getState().setState(3)
def delete(self):
- """Deletes the case from data base. Returns True if deletion succseeds
+ """Delete the case from the data base.
+ The method raises exceptions if the case cannot be deleted.
"""
- try:
- db.execute(DELETE_CASE_SQL, {'id': self.id})
- return True
- except Exception:
- log.exception("Error trying to delete case %r" % (self.id,))
- return False
+ db.execute(DELETE_CASE_SQL, {'id': self.id})
def markAnonymize(self):
"""Mark case for anonymization"""
More information about the Mpuls-commits
mailing list