diff --git a/cg_lims/EPPs/files/ont_json_to_udf.py b/cg_lims/EPPs/files/ont_json_to_udf.py index e33e5a02..77cd2927 100644 --- a/cg_lims/EPPs/files/ont_json_to_udf.py +++ b/cg_lims/EPPs/files/ont_json_to_udf.py @@ -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: