Skip to content

Commit

Permalink
Correctly parse riskmetric dependency assessment
Browse files Browse the repository at this point in the history
  • Loading branch information
jthompson-arcus committed Jul 9, 2024
1 parent bd8001c commit 4035e6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils_insert_db.R
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ insert_riskmetric_to_db <- function(pkg_name, pkg_version = "",

metric_value <- case_when(
"pkg_metric_error" %in% class(riskmetric_assess[[metric$name]][[1]]) ~ "pkg_metric_error",
metric$name == "dependencies" ~ as.character(length(unlist(as.vector(riskmetric_assess[[metric$name]][[1]][1])))),
metric$name == "dependencies" ~ as.character(NROW(riskmetric_assess[[metric$name]][[1]])),
metric$name == "reverse_dependencies" ~ as.character(length(as.vector(riskmetric_assess[[metric$name]][[1]]))),
metric$is_perc == 1L ~ as.character(round(riskmetric_score[[metric$name]]*100, 2)[[1]]),
TRUE ~ as.character(riskmetric_assess[[metric$name]][[1]][1:length(riskmetric_assess[[metric$name]])])
Expand Down

0 comments on commit 4035e6e

Please sign in to comment.