Skip to content

Commit

Permalink
check if the layer is a vectorlayer before getting the fields. This f…
Browse files Browse the repository at this point in the history
…ixes #849
  • Loading branch information
signedav committed Nov 29, 2023
1 parent 634ebce commit 5f0acdf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modelbaker/utils/qgis_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ def get_oid_settings(self):
tree_layers = root.findLayers()
for tree_layer in tree_layers:
# get t_ili_tid field OID field
if tree_layer.layer().type() != QgsMapLayer.VectorLayer:
continue
fields = tree_layer.layer().fields()
field_idx = fields.lookupField("t_ili_tid")
if field_idx < 0:
Expand Down

0 comments on commit 5f0acdf

Please sign in to comment.