From d9228083dcf26fa46b03c7dd12db645c0f90a662 Mon Sep 17 00:00:00 2001 From: eblondel Date: Tue, 14 May 2024 13:34:00 +0200 Subject: [PATCH] fix csv guess_max in case passed through ocs --- inst/metadata/entity/entity_handler_csv.R | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inst/metadata/entity/entity_handler_csv.R b/inst/metadata/entity/entity_handler_csv.R index 69b888f5..9ed7bbb4 100644 --- a/inst/metadata/entity/entity_handler_csv.R +++ b/inst/metadata/entity/entity_handler_csv.R @@ -3,7 +3,9 @@ handle_entities_csv <- function(handler, source, config, handle = TRUE){ #read csv TODO -> options management: sep, encoding etc #source <- read.csv(source,stringsAsFactors = F) - source <- as.data.frame(readr::read_csv(source, guess_max = handler$getOption("guess_max"))) + guess_max = handler$getOption("guess_max") + if(is.null(guess_max)) guess_max = 0 + source <- as.data.frame(readr::read_csv(source, guess_max = guess_max)) if(!handle) return(source) #apply generic handler