Skip to content

Commit

Permalink
ensure nrow> 0 in create_dev_project_overview
Browse files Browse the repository at this point in the history
  • Loading branch information
DivadNojnarg authored Oct 19, 2023
1 parent d378fb7 commit 9ca45da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/helpers-charts.R
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,14 @@ create_dev_project_overview <- function(client, apps_usage, selected_dev) {

renderVisNetwork({
if (is.reactive(apps_usage)) apps_usage <- apps_usage()
if (is.reactive(selected_dev)) selected_dev <- selected_dev()
apps <- get_rsc_developer_apps_list(
connectapi::user_guid_from_username(client, selected_dev()),
connectapi::user_guid_from_username(client, selected_dev),
apps_usage
)

validate(need(nrow(apps) > 0, sprintf("No data found for %s", selected_dev)))

groups <- c(
rep(1, 1),
rep(2, nrow(apps))
Expand Down

0 comments on commit 9ca45da

Please sign in to comment.