[Mpuls-commits] r992 - in wasko/branches/2.0: . waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Jan 28 17:29:53 CET 2010


Author: bh
Date: 2010-01-28 17:29:52 +0100 (Thu, 28 Jan 2010)
New Revision: 992

Modified:
   wasko/branches/2.0/ChangeLog
   wasko/branches/2.0/waskaweb/model/case.py
Log:
* waskaweb/model/case.py (State.getAccessTime, State.getLastDate):
Remove the format parameter so that these methods always return
the actual datetime object.  The format parameter isn't used
anymore now.


Modified: wasko/branches/2.0/ChangeLog
===================================================================
--- wasko/branches/2.0/ChangeLog	2010-01-28 16:29:30 UTC (rev 991)
+++ wasko/branches/2.0/ChangeLog	2010-01-28 16:29:52 UTC (rev 992)
@@ -1,5 +1,12 @@
 2010-01-28  Bernhard Herzog  <bh at intevation.de>
 
+	* waskaweb/model/case.py (State.getAccessTime, State.getLastDate):
+	Remove the format parameter so that these methods always return
+	the actual datetime object.  The format parameter isn't used
+	anymore now.
+
+2010-01-28  Bernhard Herzog  <bh at intevation.de>
+
 	* waskaweb/templates/casemanagement/caselist.mako: Use
 	h.format_date to format the access time, instead of passing an
 	explicit format string to case.state.getAccessTime()

Modified: wasko/branches/2.0/waskaweb/model/case.py
===================================================================
--- wasko/branches/2.0/waskaweb/model/case.py	2010-01-28 16:29:30 UTC (rev 991)
+++ wasko/branches/2.0/waskaweb/model/case.py	2010-01-28 16:29:52 UTC (rev 992)
@@ -1140,23 +1140,13 @@
         else:
             return False
 
-    def getAccessTime(self, format=None):
-        if format:
-            try:
-                return self.access.strftime(format)
-            except:
-                return dd_mm_YYYY(self.access)
+    def getAccessTime(self):
         return self.access
 
-    def getLastDate(self, format=None):
+    def getLastDate(self):
         """Returns the last occuring date from appointments, aids, or
         the last accesstime
         """
-        if format:
-            try:
-                return self.last_date.strftime(format)
-            except:
-                return dd_mm_YYYY(self.last_date)
         return self.last_date
 
     def setAccessTime(self):



More information about the Mpuls-commits mailing list