Skip to content

Commit

Permalink
update set_protocol to fix unbound global variables
Browse files Browse the repository at this point in the history
  • Loading branch information
RobLBaker committed Jul 10, 2024
1 parent ba931b3 commit b8c8f7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/editEMLfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1361,7 +1361,7 @@ set_protocol <- function(eml_object,
NPS = TRUE) {

# test for properly formatted protocolID
if (nchar(project_reference_id) != 7) {
if (nchar(protocol_id) != 7) {
cat("You must supply a valid 7-digit protocol_id")
stop()
}
Expand Down Expand Up @@ -1408,11 +1408,11 @@ set_protocol <- function(eml_object,
if (dev == TRUE) {
get_url <- paste0(.ds_dev_api(),
"ReferenceCodeSearch?q=",
project_reference_id)
protocol_id)
} else {
get_url <- paste0(.ds_api(),
"ReferenceCodeSearch?q=",
project_reference_id)
protocol_id)
}

req2 <- httr::GET(get_url,
Expand Down

0 comments on commit b8c8f7c

Please sign in to comment.