[Mpuls-commits] r5404 - jmd/trunk/jmdweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Sep 30 15:25:12 CEST 2011


Author: ludwig
Date: 2011-09-30 15:25:12 +0200 (Fri, 30 Sep 2011)
New Revision: 5404

Modified:
   jmd/trunk/jmdweb/model/case.py
Log:
Issue 2321 The set_case_editor_name doesn't need to be called by setEditor.
Clean up and use the base function. It handles the case right.


Modified: jmd/trunk/jmdweb/model/case.py
===================================================================
--- jmd/trunk/jmdweb/model/case.py	2011-09-30 13:07:15 UTC (rev 5403)
+++ jmd/trunk/jmdweb/model/case.py	2011-09-30 13:25:12 UTC (rev 5404)
@@ -46,11 +46,6 @@
     jmd_name = %(jmd_name)s
 WHERE id = %(id)s"""
 
-SET_EDITOR_SQL = """SELECT set_case_editor(%(userid)s, %(caseid)s)"""
-SET_EDITOR_NAME_SQL = """
-SELECT set_case_editor_name(%(firstname)s, %(lastname)s, %(caseid)s)"""
-
-
 class CaseBundle(MpulsCaseBundle):
 
     pass
@@ -87,25 +82,7 @@
 
 class Case(MpulsCase):
 
-    def setEditor(self, userid):
-        """Sets the name of the editor in formular of the case.  First call
-        setEditor function in baseclass to transfer the case to the new user.
-        After that set the name."""
-        MpulsCase.setEditor(self, userid)
-        con, cur = None, None
-        con = db.getConnection()
-        user = UserObject(userid)
-        fields = {'caseid': self.id, 'firstname': user.first_name,
-                  'lastname': user.last_name}
-        cur = con.cursor()
-        try:
-            cur.execute(SET_EDITOR_NAME_SQL, fields)
-            con.commit()
-        except Exception, e:
-            log.debug(e)
-            con.rollback()
-        finally:
-            db.recycleConnection(con, cur)
-        return self.editor
+    pass
 
+
 # vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :



More information about the Mpuls-commits mailing list