From 04ef116e2d63c3790a37ca7d60741be3e2d60a04 Mon Sep 17 00:00:00 2001 From: signedav Date: Wed, 7 Dec 2022 11:59:27 +0100 Subject: [PATCH 1/4] bump toppingmaker --- scripts/package_pip_packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package_pip_packages.sh b/scripts/package_pip_packages.sh index aebb367..03d1faa 100755 --- a/scripts/package_pip_packages.sh +++ b/scripts/package_pip_packages.sh @@ -3,7 +3,7 @@ LIBS_DIR="modelbaker/libs" DEPRECATION=("deprecation" "2.1.0") PGSERVICEPARSER=("pgserviceparser" "1.1.0") -TOPPINGMAKER=("toppingmaker" "1.1.0") +TOPPINGMAKER=("toppingmaker" "1.2.0") PACKAGES=( DEPRECATION[@] From ac9003dd3dd619d3d5dbda6e28d41f5e37390b74 Mon Sep 17 00:00:00 2001 From: signedav Date: Wed, 7 Dec 2022 15:52:22 +0100 Subject: [PATCH 2/4] check if layers found before access --- modelbaker/dataobjects/project.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/modelbaker/dataobjects/project.py b/modelbaker/dataobjects/project.py index d47547d..59adbf5 100644 --- a/modelbaker/dataobjects/project.py +++ b/modelbaker/dataobjects/project.py @@ -25,8 +25,8 @@ QgsExpressionContextUtils, QgsLayerTreeGroup, QgsMapLayer, - QgsPrintLayout, QgsMapThemeCollection, + QgsPrintLayout, QgsProject, QgsReadWriteContext, ) @@ -244,7 +244,7 @@ def create( self.legend.create(qgis_project, group) self.load_custom_layer_order(qgis_project) - + self.load_mapthemes(qgis_project) self.load_custom_variables(qgis_project) @@ -313,7 +313,10 @@ def load_mapthemes(self, qgis_project): map_theme_record.setCheckedGroupNodes(checked_group_nodes) else: # it's not group node - if qgis_project.mapLayersByName(node_name)[0]: + if ( + qgis_project.mapLayersByName(node_name) + and qgis_project.mapLayersByName(node_name)[0] + ): map_theme_layer_record = ( QgsMapThemeCollection.MapThemeLayerRecord() ) From b91f56334d7258735169158b8b70f7573fb4b480 Mon Sep 17 00:00:00 2001 From: signedav Date: Wed, 7 Dec 2022 16:04:32 +0100 Subject: [PATCH 3/4] bump toppingmaker --- scripts/package_pip_packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package_pip_packages.sh b/scripts/package_pip_packages.sh index 03d1faa..184185a 100755 --- a/scripts/package_pip_packages.sh +++ b/scripts/package_pip_packages.sh @@ -3,7 +3,7 @@ LIBS_DIR="modelbaker/libs" DEPRECATION=("deprecation" "2.1.0") PGSERVICEPARSER=("pgserviceparser" "1.1.0") -TOPPINGMAKER=("toppingmaker" "1.2.0") +TOPPINGMAKER=("toppingmaker" "1.2.2") PACKAGES=( DEPRECATION[@] From a9e9a8055ad462e85e66a5ab66c60d9892789302 Mon Sep 17 00:00:00 2001 From: signedav Date: Wed, 7 Dec 2022 17:21:55 +0100 Subject: [PATCH 4/4] bump again --- scripts/package_pip_packages.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/package_pip_packages.sh b/scripts/package_pip_packages.sh index 184185a..c3f34f0 100755 --- a/scripts/package_pip_packages.sh +++ b/scripts/package_pip_packages.sh @@ -3,7 +3,7 @@ LIBS_DIR="modelbaker/libs" DEPRECATION=("deprecation" "2.1.0") PGSERVICEPARSER=("pgserviceparser" "1.1.0") -TOPPINGMAKER=("toppingmaker" "1.2.2") +TOPPINGMAKER=("toppingmaker" "1.2.3") PACKAGES=( DEPRECATION[@]