Skip to content

Commit

Permalink
Use orm.Dict.get_dict() to get the Python dictionary (#211)
Browse files Browse the repository at this point in the history
In earlier versions of AiiDA (I guess <2.5) the `get()` method is not yet implemented
for the `orm.Dict` object. To support a wider range of AiiDA versions, we convert an
`omr.Dict` to the regular Python dictionary.
  • Loading branch information
cpignedoli authored Mar 16, 2024
1 parent 7c2dd38 commit b4f4de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aiida_cp2k/workchains/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def results(self):
trajectories = self._collect_all_trajetories()
if trajectories:
self.report("Work chain completed successfully, collecting all trajectories")
if self.ctx.inputs.parameters.get("GLOBAL", {}).get("RUN_TYPE") == "GEO_OPT":
if self.ctx.inputs.parameters.get_dict().get("GLOBAL", {}).get("RUN_TYPE") == "GEO_OPT":
output_trajectory = utils.merge_trajectory_data_non_unique(*trajectories)
else:
output_trajectory = utils.merge_trajectory_data_unique(*trajectories)
Expand Down

0 comments on commit b4f4de5

Please sign in to comment.