Преглед изворни кода

Fix table creation

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55348 15284696-431f-4ddb-bdfa-cd5b030d7da7
Pietro Zambelli пре 12 година
родитељ
комит
cb84959dae
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      lib/python/pygrass/vector/abstract.py

+ 3 - 3
lib/python/pygrass/vector/abstract.py

@@ -337,8 +337,8 @@ class Info(object):
                 # add the new link
                 self.dblinks.add(link)
                 # create the table
-                table = self.get_table()
-                table.columns.create(tab_cols)
+                table = link.table()
+                table.create(tab_cols)
                 table.conn.commit()
 
         # check the C function result.
@@ -351,7 +351,7 @@ class Info(object):
             self.table = None
             self.n_lines = 0
         else:
-            self.layer = self.dblinks.by_layer(layer)
+            self.layer = self.dblinks.by_layer(layer).layer
             self.table = self.dblinks.by_layer(layer).table()
             self.n_lines = self.table.n_rows()
         self.writable = self.mapset == functions.getenv("MAPSET")