Skip to content

Commit

Permalink
Merge pull request #17278 from mvdbeek/fix_invocation_state_none
Browse files Browse the repository at this point in the history
Fix invocation serialization if no state was set
  • Loading branch information
mvdbeek authored Jan 12, 2024
2 parents 18b7add + d3ae08d commit ea61fcd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/galaxy/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8569,6 +8569,9 @@ def _serialize(self, id_encoder, serialization_options):

def to_dict(self, view="collection", value_mapper=None, step_details=False, legacy_job_state=False):
rval = super().to_dict(view=view, value_mapper=value_mapper)
if rval["state"] is None:
# bugs could result in no state being set
rval["state"] = self.states.FAILED
if view == "element":
steps = []
for step in self.steps:
Expand Down

0 comments on commit ea61fcd

Please sign in to comment.