materialsproject / fireworks

The Fireworks Workflow Management Repo.
https://materialsproject.github.io/fireworks
Other
351 stars 184 forks source link

Fix `lpad.delete_fws` if `fw_id` not found #523

Closed janosh closed 5 months ago

janosh commented 5 months ago
launchpad.delete_fws([1087263487612])

File ~/dev/fireworks/fireworks/core/launchpad.py:584, in LaunchPad.delete_fws(self, fw_ids, delete_launch_dirs)
    582     fw_dict = self.fireworks.find_one({"fw_id": fw_id})
    583     # if fw_dict:
--> 584     potential_launch_ids += fw_dict["launches"] + fw_dict["archived_launches"]
    586 launch_ids = [
    587     launch_id
    588     for launch_id in potential_launch_ids
   (...)
    592     )
    593 ]
    595 if delete_launch_dirs:

TypeError: 'NoneType' object is not subscriptable