[Mpuls-commits] r170 - in waska/trunk: . waskaweb/controllers waskaweb/model

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Sep 17 14:21:34 CEST 2008


Author: torsten
Date: 2008-09-17 14:21:33 +0200 (Wed, 17 Sep 2008)
New Revision: 170

Modified:
   waska/trunk/ChangeLog.txt
   waska/trunk/waskaweb/controllers/waska.py
   waska/trunk/waskaweb/model/phases_factory.py
Log:
Fixed from feedback for 1.4.0 release


Modified: waska/trunk/ChangeLog.txt
===================================================================
--- waska/trunk/ChangeLog.txt	2008-09-17 10:30:12 UTC (rev 169)
+++ waska/trunk/ChangeLog.txt	2008-09-17 12:21:33 UTC (rev 170)
@@ -7,6 +7,11 @@
 	  the current und prior phases are completed and all required fields
 	  are present (feedback gsub)
 
+	Further fixes for feedback for 1.4.0 release.
+
+	* waskaweb/model/phases_factory.py: Fixed encoding
+	* waskaweb/controllers/waska.py: Fixed summing of inconsistent cases
+
 2008-09-16	Torsten Irlaender  <torsten.irlaender at intevation.de>
 
 	Changed date limit for inconsistency checks to '31.08.2008'

Modified: waska/trunk/waskaweb/controllers/waska.py
===================================================================
--- waska/trunk/waskaweb/controllers/waska.py	2008-09-17 10:30:12 UTC (rev 169)
+++ waska/trunk/waskaweb/controllers/waska.py	2008-09-17 12:21:33 UTC (rev 170)
@@ -44,6 +44,7 @@
 
 import md5
 from datetime import datetime
+from sets import Set
 
 log = logging.getLogger(__name__)
 
@@ -94,10 +95,10 @@
         #Search inconsistencys on phases but ignore older cases. 
         search_str2 = "state:1;state:2;state:4;bad:clearing_start;bad:clearing_ende;bad:beratung_start;bad:beratung_ende;bad:cm_start;bad:cm_ende;bad:nachbetreuung_start;bad:nachbetreuung_ende;only_cases_after:'%s';own:%s" % (INCONSISTENCY_CHECK_AFTER, user.id)
 
-        num_error_cases1 = len(CaseOverview().search(search_str1))
-        num_error_cases2 = len(CaseOverview().search(search_str2))
+        error_cases1 = Set(c.id for c in CaseOverview().search(search_str1))
+        error_cases2 = Set(c.id for c in CaseOverview().search(search_str2))
 
-        c.num_error_cases = max(num_error_cases1, num_error_cases2)
+        c.num_error_cases = len(error_cases1.union(error_cases2))
 
         if c.num_error_cases > 0:
             session['hascaseerrors'] = True

Modified: waska/trunk/waskaweb/model/phases_factory.py
===================================================================
--- waska/trunk/waskaweb/model/phases_factory.py	2008-09-17 10:30:12 UTC (rev 169)
+++ waska/trunk/waskaweb/model/phases_factory.py	2008-09-17 12:21:33 UTC (rev 170)
@@ -259,8 +259,8 @@
         return ',\n'.join(out)
 
 PAIRS = (
-    (CLEAR_START,    CLEAR_ENDE,    u"Eingangs-&#8203;Anamnese"),
-    (CM_START,       CM_ENDE,       u"Case-&#8203;Management"),
+    (CLEAR_START,    CLEAR_ENDE,    u"Eingangs-<wbr />Anamnese"),
+    (CM_START,       CM_ENDE,       u"Case-<wbr />Management"),
     (BERATUNG_START, BERATUNG_ENDE, u"Beratung"),
     (NB_START,       NB_ENDE,       u"Nach&shy;betreuung"))
 



More information about the Mpuls-commits mailing list