Skip to content

Commit

Permalink
Allow NULL in check_choice_from_col_contents if check_flags is OK wit…
Browse files Browse the repository at this point in the history
…h it. Fix mock to match mod_lineplot signature.
  • Loading branch information
ml-ebs-ext committed Jan 30, 2025
1 parent c19cccb commit f24472c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/CM.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# YT#VH0ae1b0c3bf862b3b93194fa0f023686d#VHd74cfd54b905c92b95c251b87af2e842#
# YT#VH1fc85ef8b30209dcb75c0d99e67635da#VH0ae1b0c3bf862b3b93194fa0f023686d#
CM <- local({ # _C_hecked _M_odule
message_well <- function(title, contents, color = "f5f5f5") { # repeats #iewahg
style <- sprintf(r"---(
Expand Down Expand Up @@ -514,7 +514,7 @@ CM <- local({ # _C_hecked _M_odule
check_choice_from_col_contents <- function(name, value, flags, dataset_name, dataset_value, column, warn, err) {
ok <- check_flags(name, value, flags, warn, err) &&
assert(
err, all(value %in% dataset_value[[column]]),
err, is.null(value) || all(value %in% dataset_value[[column]]),
sprintf(
"`%s` should contain only values present in column `%s` of dataset `%s`: %s.",
name, column, dataset_name, list_values(dataset_value[[column]])
Expand Down
4 changes: 2 additions & 2 deletions R/mock_lineplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ mock_app_lineplot_mm_safetyData <- function() {
value_vars = c("AVAL", "CHG"),
subjid_var = "SUBJID",
cat_var = "PARCAT1",
default_centrality_function = "Mean",
default_dispersion_function = "Standard deviation",
default_centrality_fn = "Mean",
default_dispersion_fn = "Standard deviation",
default_cat = "CHEM",
default_par = "Bilirubin (umol/L)",
default_main_group = "ARM",
Expand Down

0 comments on commit f24472c

Please sign in to comment.