Jelajahi Sumber

wxGUI/dbmgr: fix editing table records

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55345 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 12 tahun lalu
induk
melakukan
4ceaee5490
1 mengubah file dengan 2 tambahan dan 2 penghapusan
  1. 2 2
      gui/wxpython/dbmgr/base.py

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

@@ -1301,10 +1301,10 @@ class DbMgrBrowsePage(DbMgrNotebookBase):
                                 idx = i
                             
                             if column['ctype'] != types.StringType:
-                                tlist.itemDataMap[item][idx] = column['ctype'] (value)
+                                tlist.itemDataMap[item][idx] = column['ctype'] (values[i])
                             else: # -> string
                                 tlist.itemDataMap[item][idx] = values[i]
-                        except:
+                        except ValueError:
                             raise ValueError(_("Value '%(value)s' needs to be entered as %(type)s.") % \
                                                  {'value' : str(values[i]),
                                                   'type' : column['type']})