Skip to content

Commit

Permalink
Merge pull request #772 from tschaume/patch-extract-from-calcs-reversed
Browse files Browse the repository at this point in the history
check for obj_key
  • Loading branch information
Zhuoying authored May 19, 2023
2 parents 43298db + 27eae8a commit 387938d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion atomate/vasp/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def extract_from_calcs_reversed(obj_key):
# remove the big object from all calcs_reversed
# this can catch situations were the drone added the data to more than one calc.
for i_calcs in range(len(task_doc["calcs_reversed"])):
del task_doc["calcs_reversed"][i_calcs][obj_key]
if obj_key in task_doc["calcs_reversed"][i_calcs]:
del task_doc["calcs_reversed"][i_calcs][obj_key]
return calcs_r_data

# drop the data from the task_document and keep them in a separate dictionary (big_data_to_store)
Expand Down

0 comments on commit 387938d

Please # to comment.