From e19ea5d2733a5fe5bb7b2d70e2c957e98f2fa0b7 Mon Sep 17 00:00:00 2001 From: addelany Date: Wed, 5 Jun 2024 15:55:25 -0500 Subject: [PATCH] fix author generation --- R/generate_authors.R | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/R/generate_authors.R b/R/generate_authors.R index a72fcc0..08d6baf 100644 --- a/R/generate_authors.R +++ b/R/generate_authors.R @@ -9,7 +9,15 @@ generate_authors <- function(model, metadata_table){ model_info <- metadata_table |> filter(model_id == model) - if (model_info$`Can we publicly list your name and email as part of the model metadata?` == 'Yes'){ + if (is.na(model_info$`Can we publicly list your name and email as part of the model metadata?`)){ + + x <- list(list('url' = 'pending', + 'name' = 'pending', + 'roles' = list("producer", + "processor", + "licensor"))) + + }else if (model_info$`Can we publicly list your name and email as part of the model metadata?` == 'Yes'){ url_info <- model_info$`Contact email` name_info <- model_info$`Contact name` @@ -19,13 +27,7 @@ generate_authors <- function(model, metadata_table){ 'roles' = list("producer", "processor", "licensor"))) - }else if (is.na(model_info$`Can we publicly list your name and email as part of the model metadata?`)){ - x <- list(list('url' = 'pending', - 'name' = 'pending', - 'roles' = list("producer", - "processor", - "licensor"))) }else{ x <- list(list('url' = 'pending', 'name' = 'pending',