Skip to content

Commit

Permalink
check unique_ids isn't empty
Browse files Browse the repository at this point in the history
losely associated w/ #400
  • Loading branch information
wibeasley committed Jul 22, 2022
1 parent 09fb518 commit 1d591ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/redcap-read.R
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ redcap_read <- function(
# Continue as intended if the initial query succeeded. --------------------
unique_ids <- sort(unique(initial_call$data[[id_position]]))

if (all(nchar(unique_ids)==32L))
if (0L < length(unique_ids) & all(nchar(unique_ids)==32L))
warn_hash_record_id() # nocov

ds_glossary <- REDCapR::create_batch_glossary(row_count=length(unique_ids), batch_size=batch_size)
Expand Down

0 comments on commit 1d591ef

Please sign in to comment.