瀏覽代碼

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 7 年之前
父節點
當前提交
9a87d06bb4
共有 1 個文件被更改,包括 2 次插入2 次删除
  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