Skip to content

Commit

Permalink
Fix empty data frame dplyr type issue
Browse files Browse the repository at this point in the history
  • Loading branch information
azimov authored Mar 22, 2024
1 parent 02a5906 commit 402c958
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/DataModel.R
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ uploadChunk <- function(chunk, pos, env, specifications, resultsFolder, connecti


# Check if inserting data would violate primary key constraints:
if (!is.null(env$primaryKeyValuesInDb)) {
if (!is.null(env$primaryKeyValuesInDb) && nrow(env$primaryKeyValuesInDb) > 0) {
primaryKeyValuesInChunk <- unique(chunk[env$primaryKey])
duplicates <-
dplyr::inner_join(env$primaryKeyValuesInDb,
Expand Down

0 comments on commit 402c958

Please sign in to comment.