[Mpuls-commits] r5267 - waska/branches/waska3/waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Aug 30 09:28:19 CEST 2011


Author: torsten
Date: 2011-08-30 09:28:18 +0200 (Tue, 30 Aug 2011)
New Revision: 5267

Modified:
   waska/branches/waska3/waskaweb/model/case.py
Log:
Nicht genutzte ?\195?\188berschriebene Klassen entfernt.


Modified: waska/branches/waska3/waskaweb/model/case.py
===================================================================
--- waska/branches/waska3/waskaweb/model/case.py	2011-08-30 07:09:06 UTC (rev 5266)
+++ waska/branches/waska3/waskaweb/model/case.py	2011-08-30 07:28:18 UTC (rev 5267)
@@ -40,83 +40,23 @@
 
 log = logging.getLogger(__name__)
 
-# SQL STATEMENTS
-INIT_CASE_SQL = """
-UPDATE master_tbl_view
-SET
-    vorname = %(vorname)s,
-    name = %(nachname)s,
-    name_kompetenzagentur = %(ka_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
 
-
 class CaseOverview(MpulsCaseOverview):
-
     pass
 
-
 class State(MpulsCaseState):
-
     pass
 
-
 class CaseFactory(MpulsCaseFactory):
-    """ Initialise the case with some sensible values """
-    def _initNewCase(self, id):
-        conn, cur = None, None
-        try:
-            user = session['USER_AUTHORIZED']
-            agency = Agency()
-            fields = {
-                'vorname': user.first_name,
-                'nachname': user.last_name,
-                'ka_name': agency.getName(),
-                'id': int(id)
-                }
-            conn = db.getConnection()
-            cur = conn.cursor()
-            cur.execute(INIT_CASE_SQL, fields)
-            conn.commit()
-        finally:
-            db.recycleConnection(conn, cur)
+    pass
 
-
 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
-
-
     def getDiscretionStatement(self):
-        self.discretion_statement = None
         """Returns the discretion statement of the case"""
+        self.discretion_statement = None
         if not self.discretion_statement is None:
             return self.discretion_statement
         try:



More information about the Mpuls-commits mailing list