소스 검색

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