浏览代码

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