Parcourir la source

python temporal: fix https://trac.osgeo.org/grass/ticket/2790

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@72403 15284696-431f-4ddb-bdfa-cd5b030d7da7
Luca Delucchi il y a 7 ans
Parent
commit
c52c804e62
1 fichiers modifiés avec 4 ajouts et 3 suppressions
  1. 4 3
      lib/python/temporal/list_stds.py

+ 4 - 3
lib/python/temporal/list_stds.py

@@ -250,7 +250,8 @@ def list_maps_of_stds(type, input, columns, order, where, separator,
     else:
         # In comma separated mode only map ids are needed
         if method == "comma":
-            columns = "id"
+            if columns not in ['id', 'name']:
+                columns = "id"
 
         rows = sp.get_registered_maps(columns, where, order, dbif)
 
@@ -260,9 +261,9 @@ def list_maps_of_stds(type, input, columns, order, where, separator,
                 count = 0
                 for row in rows:
                     if count == 0:
-                        string += row["id"]
+                        string += row[columns]
                     else:
-                        string += ",%s" % row["id"]
+                        string += ",%s" % row[columns]
                     count += 1
                 if outpath:
                     outfile.write('{st}\n'.format(st=string))