[Mpuls-commits] r2112 - wasko/branches/2.0/jmdweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 24 15:37:14 CET 2010


Author: torsten
Date: 2010-03-24 15:37:14 +0100 (Wed, 24 Mar 2010)
New Revision: 2112

Modified:
   wasko/branches/2.0/jmdweb/model/case.py
Log:
* jmdweb/model/case.py (SessionCase.isYoungerThan): Deleted. Seems not
to be used in jmdweb.
* jmdweb/model/case.py (Case.isYoungerThan): Deleted. Seems not to be
used in jmdweb.



Modified: wasko/branches/2.0/jmdweb/model/case.py
===================================================================
--- wasko/branches/2.0/jmdweb/model/case.py	2010-03-24 14:35:09 UTC (rev 2111)
+++ wasko/branches/2.0/jmdweb/model/case.py	2010-03-24 14:37:14 UTC (rev 2112)
@@ -36,8 +36,6 @@
 
 from pylons.i18n import _
 
-from formed.meta import UNKNOWN_DATE
-
 from mpulsweb.lib.base import session, g
 from mpulsweb.lib.db import db
 
@@ -143,23 +141,6 @@
             data[field.name] = getattr(self, field.alias)
         return data
 
-    def isYoungerThan(self, mydate):
-        """Return True if case was active relative to mydate.
-
-        Case either started or finished after mdate, or no end date set.
-        """
-        y, m, d = mydate.split('-')
-        if self.first_meeting:
-            if self.first_meeting > date(int(y), int(m), int(d)):
-                return True
-            elif self.cm_end and (self.cm_end <= date(int(y), int(m), int(d))
-                                  and self.cm_end != UNKNOWN_DATE):
-                return False
-            else:
-                return True
-        return True
-
-
 class Case(MpulsCase):
 
     def __init__(self, id=None, preset=None, state_id=None, state_status=None,
@@ -270,22 +251,6 @@
             ps.keepUndefined()
         self.getState().setState(1)
 
-    def isYoungerThan(self, mydate):
-        """Return True if case was active relative to mydate.
-
-        Case either started or finished after mdate, or no end date set.
-        """
-        y, m, d = mydate.split('-')
-        if self.first_meeting:
-            if self.first_meeting > date(int(y), int(m), int(d)):
-                return True
-            elif self.cm_end and (self.cm_end <= date(int(y), int(m), int(d))
-                                  and self.cm_end != UNKNOWN_DATE):
-                return False
-            else:
-                return True
-        return True
-
 class State(MpulsCaseState):
     pass
 



More information about the Mpuls-commits mailing list