[Mpuls-commits] r5434 - wasko/trunk/waskoweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri Oct 7 21:50:26 CEST 2011


Author: bh
Date: 2011-10-07 21:50:24 +0200 (Fri, 07 Oct 2011)
New Revision: 5434

Modified:
   wasko/trunk/waskoweb/lib/search.py
Log:
The values in the gender mapping for the search are ints, not strings.

The values in WASKO are swapped compared to the base so the values have
to be translated. For some reason the values were changed to strings in
r3441 after the corresponding validator was changed to Int in the base
on the previous day in r3433. The gender based search has probably
yielded incorrect results since then. We were saved somewhat by the fact
that since the AppMixin has been added the gender based search wasn't
possible at all, so nobody should have run into this defect.


Modified: wasko/trunk/waskoweb/lib/search.py
===================================================================
--- wasko/trunk/waskoweb/lib/search.py	2011-10-07 19:44:38 UTC (rev 5433)
+++ wasko/trunk/waskoweb/lib/search.py	2011-10-07 19:50:24 UTC (rev 5434)
@@ -45,7 +45,7 @@
     MULTI_OPTIONS = ("type_ending",)
 
     # In wasko, the values for male and female are swapped.
-    wasko_gender_mapping = {"1": "0", "0": "1"}
+    wasko_gender_mapping = {1: 0, 0: 1}
 
     def extra_validators(self):
         validators = super(AppMixin, self).extra_validators()



More information about the Mpuls-commits mailing list