[GRASS-SVN] r68230 - grass/trunk/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 9 07:57:22 PDT 2016


Author: martinl
Date: 2016-04-09 07:57:22 -0700 (Sat, 09 Apr 2016)
New Revision: 68230

Modified:
   grass/trunk/gui/wxpython/dbmgr/base.py
Log:
wxGUI/dbmgr: fix string handling (quotes)

Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py	2016-04-09 14:35:51 UTC (rev 68229)
+++ grass/trunk/gui/wxpython/dbmgr/base.py	2016-04-09 14:57:22 UTC (rev 68230)
@@ -1840,11 +1840,12 @@
             if self.dbMgrData['mapDBInfo'].tables[table][whereCol]['ctype'] == str:
                 # string attribute, check for quotes
                 whereVal = whereVal.replace('"', "'")
-                if not whereVal.startswith("'"):
-                    whereVal = "'" + whereVal
-                if not whereVal.endswith("'"):
-                    whereVal += "'"
-                whereWin.SetValue(whereVal)
+                if whereVal:
+                    if not whereVal.startswith("'"):
+                        whereVal = "'" + whereVal
+                    if not whereVal.endswith("'"):
+                        whereVal += "'"
+                    whereWin.SetValue(whereVal)
             
             try:
                 if len(whereVal) > 0:



More information about the grass-commit mailing list