materialsproject / fireworks

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

[BUG FIX] remove `_id` from `archived_launches` #503

Closed jmmshn closed 1 year ago

jmmshn commented 1 year ago

I noticed some restarted jobs not rendering because the _id fields are pulled from the archived_launches which results in the following error in the webgui:

  File "/Users/shen9/local/Caskroom/miniconda/base/envs/mp/lib/python3.9/site-packages/flask/json/provider.py", line 122, in _default
    raise TypeError(f"Object of type {type(o).__name__} is not JSON serializable")

And does not allow the page to be opened. This PR should fix that problem.

janosh commented 1 year ago

Maybe casting to str would be better?

jmmshn commented 1 year ago

The _id is never used for any of our codes. But I'm OK with casting it to str either way.