Browse Source

v.rast.stats: fix handling column prefixes (merge from trunk, https://trac.osgeo.org/grass/changeset/66864)

git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@67033 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 years ago
parent
commit
3c14bc7869
1 changed files with 1 additions and 1 deletions
  1. 1 1
      scripts/v.rast.stats/v.rast.stats.py

+ 1 - 1
scripts/v.rast.stats/v.rast.stats.py

@@ -262,7 +262,7 @@ def main():
         f.write("UPDATE %s SET" % fi['table'])
         f.write("UPDATE %s SET" % fi['table'])
         first_var = 1
         first_var = 1
         for colname in colnames:
         for colname in colnames:
-            variable = colname.replace("%s_" % colprefix, '')
+            variable = colname.replace("%s_" % colprefix, '', 1)
             if dbfdriver:
             if dbfdriver:
                 variable = variables_dbf[variable]
                 variable = variables_dbf[variable]
             i = variables[variable]
             i = variables[variable]