[Mpuls-commits] r219 - waska/trunk/waskaweb/controllers
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 12 12:37:27 CET 2008
Author: torsten
Date: 2008-11-12 12:37:26 +0100 (Wed, 12 Nov 2008)
New Revision: 219
Modified:
waska/trunk/waskaweb/controllers/waska.py
Log:
Fixed issue645
Modified: waska/trunk/waskaweb/controllers/waska.py
===================================================================
--- waska/trunk/waskaweb/controllers/waska.py 2008-11-03 11:10:22 UTC (rev 218)
+++ waska/trunk/waskaweb/controllers/waska.py 2008-11-12 11:37:26 UTC (rev 219)
@@ -84,26 +84,23 @@
c.appointmentlist = caseapp
c.globalappointmentlist = globalapp
- # LOAD NEWS
- c.news = NewsList(user)
+ #find out if there are cases with errors
+ #Search inconsistencys on dates
+ search_str1 = "state:1;state:2;state:4;state:5;bad:1;bad:2;bad:3;bad:4;bad:5;bad:6;bad:7;own:%s" % user.id
+ #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)
+ 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 = len(error_cases1.union(error_cases2))
- #find out if there are cases with errors
+ if c.num_error_cases > 0:
+ session['hascaseerrors'] = True
+ else:
+ session['hascaseerrors'] = False
+ session.save()
- #Search inconsistencys on dates
- search_str1 = "state:1;state:2;state:4;state:5;bad:1;bad:2;bad:3;bad:4;bad:5;bad:6;bad:7;own:%s" % user.id
-
- #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)
-
- 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 = len(error_cases1.union(error_cases2))
-
- if c.num_error_cases > 0:
- session['hascaseerrors'] = True
- else:
- session['hascaseerrors'] = False
- session.save()
+ # LOAD NEWS
+ c.news = NewsList(user)
return render('/start/start.mako')
def help(self):
More information about the Mpuls-commits
mailing list