Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
suricactus committed Nov 9, 2023
2 parents b30c5e0 + 52de798 commit b8a1c5e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions docker-qgis/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from libqfieldsync.offline_converter import ExportType, OfflineConverter
from libqfieldsync.project import ProjectConfiguration
from libqfieldsync.utils.file_utils import get_project_in_folder
from libqfieldsync.utils.qgis import set_bad_layer_handler
from qfieldcloud.qgis.utils import (
Step,
StepOutput,
Expand Down Expand Up @@ -44,6 +45,8 @@ def _call_qfieldsync_packager(project_filename: Path, package_dir: Path) -> str:
if not project.read(str(project_filename)):
raise Exception(f"Unable to open file with QGIS: {project_filename}")

set_bad_layer_handler(project)

layers = project.mapLayers()
project_config = ProjectConfiguration(project)
vl_extent_wkt = QgsRectangle()
Expand Down
2 changes: 1 addition & 1 deletion docker-qgis/libqfieldsync
6 changes: 5 additions & 1 deletion docker-qgis/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,7 @@ def get_layers_data(project: QgsProject) -> dict[str, dict]:
"QFieldSync/unsupported_source_pk"
),
"is_valid": layer.isValid(),
"is_localized": layer_source.is_localized_path,
"datasource": datasource,
"type": layer.type(),
"type_name": layer.type().name,
Expand All @@ -678,7 +679,10 @@ def get_layers_data(project: QgsProject) -> dict[str, dict]:
# there might be another reason why the layer is not valid, other than the data provider
layers_by_id[layer_id]["error_code"] = "invalid_layer"
else:
layers_by_id[layer_id]["error_code"] = "invalid_dataprovider"
if layer_source.is_localized_path:
layers_by_id[layer_id]["error_code"] = "localized_dataprovider"
else:
layers_by_id[layer_id]["error_code"] = "invalid_dataprovider"

layers_by_id[layer_id]["provider_error_summary"] = (
data_provider_error.summary()
Expand Down

0 comments on commit b8a1c5e

Please sign in to comment.