Skip to content
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

Update merge_expression_module.R #93

Closed
wants to merge 3 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions R/merge_expression_module.R
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ merge_expression_srv <- function(id = "merge_id",
merge_fun_name <- if (inherits(merge_function, "reactive")) merge_function() else merge_function
check_merge_function(merge_fun_name)

ds <- Filter(Negate(is.null), lapply(selector_list(), function(x) x()))
validate(need(length(ds) > 0, "At least one dataset needs to be selected"))
ds <- Filter(function(e) length(e$select) > 0, lapply(selector_list(), function(x) x()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would drop this variable from the $columns_source, so it would fail some validation. We need to dig into merge_datasets and not merge selector which is not selected

Copy link
Contributor Author

@Polkas Polkas Aug 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am closing this PR as not has even an issue number.
I assume this will be a quick updated. FOr sure this have to be properly tested

validate(need(length(ds) > 0, "Nothing selected"))
merge_datasets(
selector_list = ds,
datasets = datasets,
Expand Down