Hello,

Just want you to confirm that this is a bug or not in this plugin.

When listing (refreshing) the schema/tables, if the postgis connected user
does not have permission to all schemas/tables, Python is returning a error
on line 256 on file postgis_utils.py indicating that the index i does not
exists:  items[i] = geo_item


> # merge geometry info to "items"
>    for i, geo_item in enumerate(c.fetchall()):
>     if geo_item[7]:
>      items[i] = geo_item


I can see that there are 2 queries: somehow the second query may not return
the same number of records as in the first query.

A solution that worked for me was:


> # merge geometry info to "items"
>    for i, geo_item in enumerate(c.fetchall()):
>     if geo_item[7] and i < len(items):
>      items[i] = geo_item


Sorry, Python in not my "first language" :)

Cheers,
Marco Afonso
_______________________________________________
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to