Skip to content

Commit

Permalink
Check for referenceMap value. (#828)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <lorenzett@gis3w.it>
  • Loading branch information
wlorenzetti and wlorenzetti authored Apr 24, 2024
1 parent c4e1d05 commit 58ccf0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion g3w-admin/qdjango/server_services/vendors/threeliz/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def print_layout(project, layout_name, feature_filter: str = None, scales=None,
else:
atlas_layout.reportContext().setPredefinedScales(scales)

if not scales and atlas_layout.referenceMap().atlasScalingMode() == QgsLayoutItemMap.Predefined:
# For layout without Map items is necessary check referenceMap id not None
if (not scales and atlas_layout.referenceMap() and
atlas_layout.referenceMap().atlasScalingMode() == QgsLayoutItemMap.Predefined):
if Qgis.QGIS_VERSION_INT >= 30900:
use_project = project.useProjectScales()
map_scales = project.mapScales()
Expand Down

0 comments on commit 58ccf0d

Please sign in to comment.