Skip to content

Commit

Permalink
Check that data exists in filtering functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisBeeley committed Dec 10, 2021
1 parent 0ac648f commit 66f917f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ app_server <- function( input, output, session ) {
output$filter_location_1 <- renderUI({

req(get_golem_config("location_1"))
req(data_exists)

location_1_choices <- date_filter() %>%
dplyr::distinct(location_1) %>%
Expand All @@ -73,6 +74,7 @@ app_server <- function( input, output, session ) {
output$filter_location_2 <- renderUI({

req(get_golem_config("location_2"))
req(data_exists)

location_2_choices <- date_filter()

Expand All @@ -99,6 +101,7 @@ app_server <- function( input, output, session ) {
output$filter_location_3 <- renderUI({

req(get_golem_config("location_3"))
req(data_exists)

location_3_choices <- date_filter()

Expand Down
2 changes: 2 additions & 0 deletions R/tidy_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ tidy_all_trusts <- function(data, conn) {
comment_txt %in% c("NULL", "NA", "N/A") ~ NA_character_,
TRUE ~ category
))
} else {

data
}
}

0 comments on commit 66f917f

Please sign in to comment.