Skip to content

Commit

Permalink
Merge branch 'develop' into add_references
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulJonasJost authored Oct 10, 2023
2 parents 2cd4623 + 9b0d7fd commit 427bc1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pypesto/result/optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,11 @@ def get_for_key(self, key) -> list:
"releases."
)
return [res[key] for res in self.list]

def get_by_id(self, ores_id: str):
"""Get OptimizationResult with the specified id."""
for res in self.list:
if res.id == ores_id:
return res
else:
raise ValueError(f"no optimization result with id={ores_id}")

0 comments on commit 427bc1c

Please sign in to comment.