diff --git a/NEWS.md b/NEWS.md index 6ab82c1a4..4178e698f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -16,6 +16,9 @@ * Began deprecation cycle for the `show_labels` argument of `template_summary` which has no effect on the `tm_t_summary` module. * Replaced instances of deprecated `strata` argument to `tern::control_lineplot_vars()` with `group_var`. +### Bug fixes +* Fixed bug in creating modules with `delayed_data` and `teal.transform::all_choices`. + # teal.modules.clinical 0.9.1 ### Enhancements diff --git a/R/utils.R b/R/utils.R index f3a4e916f..2661cc194 100644 --- a/R/utils.R +++ b/R/utils.R @@ -300,8 +300,8 @@ cs_to_des_select <- function(cs, dataname, multiple = FALSE, ordered = FALSE, la checkmate::check_class(cs, classes = "choices_selected"), .var.name = cs_name ) - if (!multiple && length(cs$selected) != 1 && !is.null(cs$selected)) { - stop(cs_name, "must only have 1 selected value") + if (!inherits(cs$selected, "delayed_data") && !multiple && length(cs$selected) != 1 && !is.null(cs$selected)) { + stop(cs_name, " must only have 1 selected value") } if (inherits(cs, "choices_selected")) {