Skip to content

Commit

Permalink
fix ok bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JsLth committed Jun 26, 2024
1 parent 5d182e2 commit d89cbee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/ok.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ o311_ok <- function(error = FALSE) {
expr = {
# query requests because discovery and services are sometimes defined
# but requests cannot be retrieved
res <- o311_query("requests", simplify = FALSE)
res <- o311_query("requests")

# check if requests.json returns a valid requests json
ok <- length(res) > 1 &&
"service_request_id" %in% names(unlist(res, recursive = FALSE))
ok <- length(res) > 1 && "service_request_id" %in% names(res)

if (!ok) {
abort(
Expand Down

0 comments on commit d89cbee

Please sign in to comment.