[Mpuls-commits] r4990 - in base/trunk: . mpulsweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Fri May 20 21:32:26 CEST 2011


Author: bh
Date: 2011-05-20 21:32:24 +0200 (Fri, 20 May 2011)
New Revision: 4990

Modified:
   base/trunk/ChangeLog
   base/trunk/mpulsweb/lib/helpers.py
Log:
* mpulsweb/lib/helpers.py (get_db_selectionlist): Fix check for
omitted filter. Strings should never be compared with "is".


Modified: base/trunk/ChangeLog
===================================================================
--- base/trunk/ChangeLog	2011-05-20 16:02:36 UTC (rev 4989)
+++ base/trunk/ChangeLog	2011-05-20 19:32:24 UTC (rev 4990)
@@ -1,3 +1,8 @@
+2011-05-20  Bernhard Herzog  <bh at intevation.de>
+
+	* mpulsweb/lib/helpers.py (get_db_selectionlist): Fix check for
+	omitted filter. Strings should never be compared with "is".
+
 2011-05-20  Ludwig Reiter <ludwig.reiter at inteation.de>
 
 	* mpulsweb/templates/administration/overview_user.mako:

Modified: base/trunk/mpulsweb/lib/helpers.py
===================================================================
--- base/trunk/mpulsweb/lib/helpers.py	2011-05-20 16:02:36 UTC (rev 4989)
+++ base/trunk/mpulsweb/lib/helpers.py	2011-05-20 19:32:24 UTC (rev 4990)
@@ -120,7 +120,8 @@
 def get_db_selectionlist(filter=""):
     """Returns a dictionarie used for listing available db on the loginscreen."""
     dblist = g.mpuls_dblist.get_list()
-    if filter is "": return dblist
+    if not filter:
+        return dblist
     filtered_dblist = {}
     for k in dblist.keys():
         if not filter.match(k): continue



More information about the Mpuls-commits mailing list