[Mpuls-commits] r5324 - base/trunk/mpulsweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Sep 13 20:00:15 CEST 2011


Author: bh
Date: 2011-09-13 20:00:15 +0200 (Tue, 13 Sep 2011)
New Revision: 5324

Modified:
   base/trunk/mpulsweb/model/case.py
Log:
Port the getMeta method from WASKU to mpulsweb.

The name of the method is a bit unfortunate, because getMeta is also the
name used for methods in libformed that return parts of the meta-tree,
whereas the new getMeta method of the MpulsCase class returns the model
for the link to the meta-server. For now we should leave the name as is,
to avoid unnecessary complications during the merge from WASKU to
mpulsweb.


Modified: base/trunk/mpulsweb/model/case.py
===================================================================
--- base/trunk/mpulsweb/model/case.py	2011-09-13 17:32:01 UTC (rev 5323)
+++ base/trunk/mpulsweb/model/case.py	2011-09-13 18:00:15 UTC (rev 5324)
@@ -63,8 +63,8 @@
 from mpulsweb.model.agencysettings import Agency
 from mpulsweb.model.logbook import export_logbook, get_logbook_import_factory, \
      import_logbook
+from mpulsweb.model.meta import Meta
 
-
 log = logging.getLogger(__name__)
 
 PRESET_FIELDS_IN_MASTERTABLE = ['bearbeiter_id']
@@ -992,6 +992,10 @@
         self._load_formed_instance_tree()
         factory.copy_instance_tree(self.formed_instance)
 
+    def getMeta(self):
+        """Returns the meta object for the case identified with its id"""
+        return Meta(self.id)
+
     def markDelete(self):
         """Mark case for deletion"""
         self.getState().setState(3)



More information about the Mpuls-commits mailing list