Skip to content

Commit

Permalink
Do not check for pk_attr_name if the layer is invalid, e.g. localiz…
Browse files Browse the repository at this point in the history
…ed on cloud
  • Loading branch information
suricactus committed Nov 3, 2023
1 parent 03739a8 commit 0d3bc7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion offline_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def _convert(self, project: QgsProject) -> None:
else layer_source.cloud_action
)

if layer.type() == QgsMapLayer.VectorLayer:
if layer.isValid() and layer.type() == QgsMapLayer.VectorLayer:
if layer_source.pk_attr_name:
# NOTE even though `QFieldSync/sourceDataPrimaryKeys` is in plural, we never supported composite (multi-column) PKs and always stored a single value
layer.setCustomProperty(
Expand Down

0 comments on commit 0d3bc7a

Please sign in to comment.