Skip to content

Commit cbbdedb

Browse files
authored
Extend check of stash options when they are specified as empty dict (#6942)
The issue explained in #6945 When using the builder, the stash option is passed as an empty dictionary without validation. As a result, the stashing task is executed even when no options arugments are specified, leading to errors when the task tries to access expected keys in the dictionary. The hotfix fix extends the check to also verify if the options are not empty.
1 parent d0dedc1 commit cbbdedb

File tree

1 file changed

+1
-1
lines changed
  • src/aiida/engine/processes/calcjobs

1 file changed

+1
-1
lines changed

src/aiida/engine/processes/calcjobs/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ async def execute(self) -> plumpy.process_states.State: # type: ignore[override
553553
result = self.stash(monitor_result=monitor_result)
554554

555555
elif self._command == STASH_COMMAND:
556-
if node.get_option('stash') is not None:
556+
if node.get_option('stash'):
557557
await self._launch_task(task_stash_job, node, transport_queue)
558558
result = self.retrieve(monitor_result=self._monitor_result)
559559

0 commit comments

Comments
 (0)