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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 23 12:14:13 PDT 2018


Author: martinl
Date: 2018-03-23 12:14:12 -0700 (Fri, 23 Mar 2018)
New Revision: 72533

Modified:
   grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
Log:
wxGUI/dbmgr: better handling of text values in SQLBuilder

Modified: grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py	2018-03-23 17:47:05 UTC (rev 72532)
+++ grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py	2018-03-23 19:14:12 UTC (rev 72533)
@@ -377,10 +377,10 @@
             if justsample and i > 255:
                 break
 
-            if desc['type'] != 'character':
+            if desc['type'] not in ('character', 'text'):
                 item = str(item)
             else:
-                item = GetUnicodeValue(item)
+                item = u"'{}'".format(GetUnicodeValue(item))
             self.list_values.Append(item)
             i += 1
 



More information about the grass-commit mailing list