Skip to content

Able to run query with no active layer selected (Windows) #30

Description

@myles28

I am able to run queries with no active layer selected , which results in a python error.

Steps to reproduce:

  • (on intial load, select content and run buttons are disabled correctly)
  • Draw a manual polygon to the feature layer
  • De-select the layer (set the drop down to (---- Active Layers -----)
  • Able to press "Select Content" and "Run" buttons

Resulting python error when doing this-
2022-10-28T13:14:02 WARNING Traceback (most recent call last): File "C:\Users/Myles/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\kwg_geoenrichment\kwg_geoenrichment.py", line 734, in handleRun results.append(self.enrichmentObjBuffer[i].getResults()) File "C:\Users/Myles/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\kwg_geoenrichment\kwg_plugin_enrichment_dialog.py", line 400, in getResults subject = self.labelPropDict[self.tableWidget.cellWidget(it, 0).currentText()] KeyError: '--- SELECT ---'

Needs more detailed input validation

image

This results in just a python error, not a total qgis crash

This is running on Windows, with the most recent plugin version (v0.4)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions