Skip to content

Commit

Permalink
Fix bug in proof_of_concept.R
Browse files Browse the repository at this point in the history
Generate max_existing_id when test project is empty.
  • Loading branch information
pbchase committed Feb 3, 2025
1 parent c61c1d4 commit 374f3d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion proof_of_concept.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ read_result <- REDCapR::redcap_read(
redcap_uri = credentials$redcap_uri
)

if (read_result$success) {
if (nrow(read_result$data) > 0) {
max_existing_id <- max(read_result$data$record_id)
} else {
max_existing_id = 0
Expand Down

0 comments on commit 374f3d0

Please sign in to comment.