Skip to content

Commit

Permalink
[in-place] Fix alg runner when context is none
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Oct 20, 2018
1 parent 99f3419 commit dcd3318
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/processing/gui/AlgorithmExecutor.py
Expand Up @@ -268,6 +268,11 @@ def execute_in_place(alg, parameters, context=None, feedback=None):
:rtype: tuple
"""

if feedback is None:
feedback = QgsProcessingFeedback()
if context is None:
context = dataobjects.createContext(feedback)

if not 'INPUT' in parameters or not parameters['INPUT']:
parameters['INPUT'] = iface.activeLayer()
ok, results = execute_in_place_run(alg, parameters, context=context, feedback=feedback)
Expand Down

1 comment on commit dcd3318

@nirvn
Copy link
Contributor

@nirvn nirvn commented on dcd3318 Oct 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@elpaso , that was a quick turnaround, thanks!

Please sign in to comment.