Skip to content

Commit

Permalink
fetch run ID from artifact instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Karl-Svard committed Mar 6, 2024
1 parent 488e5da commit f806009
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions cg_lims/EPPs/files/ont_json_to_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,9 @@ def get_flow_cell_id(artifact: Artifact) -> str:

def get_experiment_id(artifact: Artifact) -> str:
""""""
parent_process = artifact.parent_process
if not parent_process.udf.get("ONT Experiment Name"):
raise MissingUDFsError(
f"Artifact {artifact.name} (from process {parent_process.id}) is missing an experiment ID!"
)
return parent_process.udf.get("ONT Experiment Name")
if not artifact.udf.get("ONT Experiment Name"):
raise MissingUDFsError(f"Artifact {artifact.name} is missing an experiment ID!")
return artifact.udf.get("ONT Experiment Name")


def get_report_json_path(artifact: Artifact, root_path: str) -> str:
Expand Down

0 comments on commit f806009

Please sign in to comment.