diff --git a/R/fct_tables.R b/R/fct_tables.R index 8a31bafe..e54a425b 100644 --- a/R/fct_tables.R +++ b/R/fct_tables.R @@ -59,7 +59,7 @@ create_table.default <- function( any(reviewed == "Yes") ~ list(list(reviewed = TRUE, ids = id)), .default = list(list(reviewed = FALSE, ids = id)) ), - .by = keep_vars) + .by = dplyr::all_of(keep_vars)) keep_vars <- c("o_reviewed", keep_vars) } df <- data[c(keep_vars, name_column, value_column)] |> diff --git a/tests/testthat/test-mod_common_forms.R b/tests/testthat/test-mod_common_forms.R index 3762094e..909a001e 100644 --- a/tests/testthat/test-mod_common_forms.R +++ b/tests/testthat/test-mod_common_forms.R @@ -52,6 +52,7 @@ describe( }) rev_data <- get_review_data(bind_rows_custom(appdata)) |> dplyr::mutate( + id = dplyr::row_number(), reviewed = sample(c("Yes", "No"), dplyr::n(), replace = TRUE), status = sample(c("new", "old", "updated"), dplyr::n(), replace = TRUE) )