Skip to content

Commit

Permalink
fix author generation
Browse files Browse the repository at this point in the history
  • Loading branch information
addelany committed Jun 5, 2024
1 parent 7537c2b commit e19ea5d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions R/generate_authors.R
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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',
Expand Down

0 comments on commit e19ea5d

Please sign in to comment.