From 6d998881ecfb37996478c063968f5fb0855f7c27 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Tue, 3 Dec 2024 15:05:03 -0500 Subject: [PATCH] Use an empty string if NULL --- R/pipeline.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/R/pipeline.R b/R/pipeline.R index 8cbc241..25f4ae1 100644 --- a/R/pipeline.R +++ b/R/pipeline.R @@ -214,7 +214,11 @@ execute_model_logic <- function(config, output_dir) { metadata <- list( job_id = config[["job_id"]], task_id = config[["task_id"]], - data_path = config[["data"]][["path"]], + data_path = ifelse( + # is_empty checks for NULL and empty data structures + rlang::is_empty(config[["data"]][["path"]]), + config[["data"]][["path"]], "" + ), model = config[["model"]], disease = config[["disease"]], geo_value = config[["geo_value"]],