[GRASS-SVN] r68231 - grass/branches/releasebranch_7_0/gui/wxpython/dbmgr

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Apr 9 07:59:30 PDT 2016


Author: martinl
Date: 2016-04-09 07:59:30 -0700 (Sat, 09 Apr 2016)
New Revision: 68231

Modified:
   grass/branches/releasebranch_7_0/gui/wxpython/dbmgr/base.py
Log:
wxGUI/dbmgr: fix string handling (quotes)
             (merge r68230 from trunk)


Modified: grass/branches/releasebranch_7_0/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/branches/releasebranch_7_0/gui/wxpython/dbmgr/base.py	2016-04-09 14:57:22 UTC (rev 68230)
+++ grass/branches/releasebranch_7_0/gui/wxpython/dbmgr/base.py	2016-04-09 14:59:30 UTC (rev 68231)
@@ -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