Explorar o código

wxGUI/dbmgr: better handling of text values in SQLBuilder

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72533 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa %!s(int64=7) %!d(string=hai) anos
pai
achega
9a87d06bb4
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      gui/wxpython/dbmgr/sqlbuilder.py

+ 2 - 2
gui/wxpython/dbmgr/sqlbuilder.py

@@ -377,10 +377,10 @@ class SQLBuilder(wx.Frame):
             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