[Mpuls-commits] r2034 - wasko/branches/2.0/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Mar 19 11:55:24 CET 2010


Author: torsten
Date: 2010-03-19 11:55:22 +0100 (Fri, 19 Mar 2010)
New Revision: 2034

Modified:
   wasko/branches/2.0/mpulsweb/model/case.py
Log:
* jmdweb/model/case.py (MpulsCase.getDocuments): New. copied from
  jmdweb


Modified: wasko/branches/2.0/mpulsweb/model/case.py
===================================================================
--- wasko/branches/2.0/mpulsweb/model/case.py	2010-03-19 10:54:58 UTC (rev 2033)
+++ wasko/branches/2.0/mpulsweb/model/case.py	2010-03-19 10:55:22 UTC (rev 2034)
@@ -39,6 +39,7 @@
 from mpulsweb.lib.helpers import ensure_unicode
 from mpulsweb.lib.db import PostgresDBInterface, db
 
+from mpulsweb.model.document import listDocuments
 from mpulsweb.model.phase import PhaseFactory, StartPhasePart, \
     ConsistenceCheckException, PHASEFIELD
 from mpulsweb.model.user import UserObject
@@ -606,6 +607,17 @@
             raise
         return None
 
+    def getDocuments(self):
+        """Returns a list of documents which are attached to this case"""
+        try:
+            # Load list of documents
+            self.documents = listDocuments(self.id)
+            return self.documents
+        except:
+            self.documents = []
+            raise
+        return []
+
     def getEditor(self):
         """Returns the editor of the case"""
         return UserObject(self.editor)



More information about the Mpuls-commits mailing list