Skip to content

Commit

Permalink
debug test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Nov 28, 2023
1 parent bc476b3 commit bbf37aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Mergin/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,15 +194,18 @@ def check_offline(self):
"""Check if there are layers that might not be available when offline"""
w = MultipleLayersWarning(Warning.NOT_FOR_OFFLINE)
for lid, layer in self.layers.items():
print("\n", layer.name(), layer.source())
# special check for vector tile layers because in QGIS < 3.22 they may not have data provider assigned
if layer.type() == QgsMapLayerType.VectorTileLayer:
print(" - vector tile")
# mbtiles/vtpk are always local files
if "type=mbtiles" not in layer.source() and "type=vtpk" not in layer.source():
w.items.append(layer.name())
continue

dp_name = layer.dataProvider().name()
if dp_name in QGIS_NET_PROVIDERS + QGIS_DB_PROVIDERS:
print(" - net/db", dp_name)
# raster tiles in mbtiles are always local files
if dp_name == "wms" and "type=mbtiles" in layer.source():
continue
Expand Down

0 comments on commit bbf37aa

Please sign in to comment.