Skip to content

Commit

Permalink
Fix workflows running from gui's tools panel not working
Browse files Browse the repository at this point in the history
This commit fixes the issue where most of the legacy workflows would not work due to ert_config not being passed to workflow_runner in run_workflow_widget.
  • Loading branch information
jonathan-eq committed Feb 4, 2025
1 parent 7c27a9c commit 0c4c3c2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/ert/gui/tools/plugins/plugin_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def __init__(
def run(self) -> None:
try:
plugin = self.__plugin

arguments = plugin.getArguments(
fixtures={"storage": self.storage, "ert_config": self.ert_config}
)
Expand All @@ -46,7 +45,7 @@ def run(self) -> None:
fixtures = {
k: getattr(self, k)
for k in ["storage", "ert_config"]
if getattr(self, k)
if hasattr(self, k)
}
workflow_job_thread = ErtThread(
name="ert_gui_workflow_job_thread",
Expand Down
1 change: 1 addition & 0 deletions src/ert/gui/tools/workflows/run_workflow_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ def startWorkflow(self) -> None:
workflow,
storage=self.storage,
ensemble=self.source_ensemble_selector.currentData(),
ert_config=self.config,
)
self._workflow_runner.run()

Expand Down
2 changes: 1 addition & 1 deletion src/ert/workflow_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def run_blocking(self) -> None:
fixtures = {
k: getattr(self, k)
for k in ["storage", "ensemble", "ert_config"]
if getattr(self, k)
if hasattr(self, k)
}

for job, args in self.__workflow:
Expand Down

0 comments on commit 0c4c3c2

Please sign in to comment.