-
-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the datanames bug causing teal app to crash when teal_data
has non standard object names
#1367
Conversation
@@ -359,7 +359,9 @@ srv_teal_module.teal_module <- function(id, | |||
|
|||
.resolve_module_datanames <- function(data, modules) { | |||
stopifnot("data_rv must be teal_data object." = inherits(data, "teal_data")) | |||
if (is.null(modules$datanames) || identical(modules$datanames, "all")) { | |||
if (length(datanames(data))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this can be a first condition. If datanames
are not null then other conditions will be ignored.
R/utils.R
Outdated
@@ -74,10 +74,13 @@ get_teal_bs_theme <- function() { | |||
#' @param datanames (`character`) vector of data set names to include; must be subset of `datanames(x)` | |||
#' @return A `FilteredData` object. | |||
#' @keywords internal | |||
teal_data_to_filtered_data <- function(x, datanames = ls(teal.code::get_env(x))) { | |||
teal_data_to_filtered_data <- function(x, datanames = teal.data::datanames(data)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can instead relax the assertion on datanames in teal.slice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR brings back datanames() <-
setter which is going to be deprecated soon. This PR fixes issue by introducing other (postponed)
Unit Tests Summary 1 files 25 suites 16m 33s ⏱️ For more details on these failures, see this check. Results for commit 0144176. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit d1b8670 ♻️ This comment has been updated with latest results. |
e8e6a11
to
0144176
Compare
Closes #1366