Skip to content

Commit

Permalink
Merge pull request #244 from opengisch/fix_deleted_layer_field
Browse files Browse the repository at this point in the history
Export only fields that are currently present
  • Loading branch information
suricactus authored May 26, 2021
2 parents 4278f43 + a13ca8d commit b917bee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qfieldsync/core/layer.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ def visible_fields_names(self, items = None):
if hasattr(item, 'children'):
result += self.visible_fields_names(item.children())
elif isinstance(item, QgsAttributeEditorField):
result.append(fields.at(item.idx()).name())
if item.idx() >= 0:
result.append(fields.at(item.idx()).name())

return result

0 comments on commit b917bee

Please sign in to comment.