Skip to content

Commit 80b0c72

Browse files
committed
Fix a Python error in Processing GUI
It turns out that an empty QComboBox evaluates to False: >>> t=QLineEdit() >>> bool(t) True >>> c=QComboBox() >>> bool(c) False Due to that, the 'TABLE' parameter was missing if its (editable) combo box was empty. Original error - while updating an algorithm's parameters (gdal:importvectorintopostgisdatabaseavailableconnections) Traceback (most recent call last): File "/home/martin/qgis/git-master/build-debug/output/python/plugins/processing/algs/gdal/GdalAlgorithmDialog.py", line 121, in parametersHaveChanged or (not p.checkValueIsAcceptable(parameters[p.name()])): KeyError: 'TABLE'
1 parent 3f16335 commit 80b0c72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/plugins/processing/gui/AlgorithmDialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def getParameterValues(self):
9797
if not param.isDestination():
9898
wrapper = self.mainWidget().wrappers[param.name()]
9999
value = None
100-
if wrapper.widget:
100+
if wrapper.widget is not None:
101101
value = wrapper.value()
102102
parameters[param.name()] = value
103103

0 commit comments

Comments
 (0)