Skip to content

Commit

Permalink
Merge pull request #144 from Samweli/saved_drawing_check
Browse files Browse the repository at this point in the history
Fix an error when generating a report
  • Loading branch information
Samweli authored Dec 11, 2024
2 parents 28f68bf + 5f2be16 commit 8444b24
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/qgis_gea_plugin/gui/qgis_gea.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,8 +1352,8 @@ def on_generate_report(self):

elif group == SITE_GROUP_NAME:
message = tr(
"Report Generation Error:"
" No site drawing has been created or saved. "
"Report Generation Error: "
"No site drawing has been created or saved. "
"To generate a report, please complete the "
"following steps: fill in the attributes, "
"draw a site polygon, save your work, and "
Expand All @@ -1362,6 +1362,13 @@ def on_generate_report(self):
if not self.is_project_info_valid(message):
return

if site_layer.dataProvider().dataSourceUri().startswith('memory'):
self.show_message(
message,
Qgis.Warning
)
return

# Get capture date and area
feature = features[0]

Expand Down

0 comments on commit 8444b24

Please sign in to comment.