[GRASS-SVN] r41299 - grass/trunk/scripts/v.db.update

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Mar 5 13:44:34 EST 2010


Author: martinl
Date: 2010-03-05 13:44:33 -0500 (Fri, 05 Mar 2010)
New Revision: 41299

Modified:
   grass/trunk/scripts/v.db.update/v.db.update.py
Log:
fix r41298


Modified: grass/trunk/scripts/v.db.update/v.db.update.py
===================================================================
--- grass/trunk/scripts/v.db.update/v.db.update.py	2010-03-05 18:42:37 UTC (rev 41298)
+++ grass/trunk/scripts/v.db.update/v.db.update.py	2010-03-05 18:44:33 UTC (rev 41299)
@@ -92,7 +92,7 @@
 
     # checking column types
     try:
-        coltype = grass.vector_columns(map, layer)[column]
+        coltype = grass.vector_columns(map, layer)[column]['type']
     except KeyError:
 	grass.fatal(_('Column <%s> not found') % column)
 
@@ -105,7 +105,7 @@
 	if not value:
 	    grass.fatal(_('Either value= or qcolumn= must be given'))
 	# we insert a value
-	if coltype['type'].upper() not in ["INTEGER", "DOUBLE PRECISION"]:
+	if coltype.upper() not in ["INTEGER", "DOUBLE PRECISION"]:
 	    value = "'%s'" % value
 
     cmd = "UPDATE %s SET %s=%s" % (table, column, value)



More information about the grass-commit mailing list