From b25ab4a73e458879a284f3bfd941151105722f89 Mon Sep 17 00:00:00 2001 From: Bennici Date: Wed, 10 Feb 2021 15:13:32 +0100 Subject: [PATCH] #107 --- R/geoflow_handler_contact.R | 2 +- R/geoflow_handler_entity.R | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/R/geoflow_handler_contact.R b/R/geoflow_handler_contact.R index 7b128bcc..87b6b2f5 100644 --- a/R/geoflow_handler_contact.R +++ b/R/geoflow_handler_contact.R @@ -25,7 +25,7 @@ handle_contacts_df <- function(config, source){ contact$setCountry(source_contact[,"Country"]) contact$setVoice(source_contact[,"Voice"]) contact$setFacsimile(source_contact[,"Facsimile"]) - contact$setWebsiteUrl(source_contact[,"WebsiteUrl"]) + if(!is.na(source_contact[,"WebsiteUrl"])& source_contact[,"WebsiteUrl"]!="") contact$setWebsiteUrl(source_contact[,"WebsiteUrl"]) contact$setWebsiteName(source_contact[,"WebsiteName"]) srcId <- sanitize_str(source_contact[,"Identifier"]) diff --git a/R/geoflow_handler_entity.R b/R/geoflow_handler_entity.R index b3c2e90e..683c0e69 100644 --- a/R/geoflow_handler_entity.R +++ b/R/geoflow_handler_entity.R @@ -83,7 +83,7 @@ handle_entities_df <- function(config, source){ #title entity$setTitle(source_entity[,"Title"]) - + #description src_description <- sanitize_str(source_entity[,"Description"]) allowedDescKeys <- entity$getAllowedKeyValuesFor("descriptions") @@ -265,7 +265,7 @@ handle_entities_gsheet <- function(config, source){ handle_entities_csv <- function(config, source){ #read csv TODO -> options management: sep, encoding etc - source <- read.csv(source) + source <- read.csv(source,stringsAsFactors = F) #apply generic handler entities <- handle_entities_df(config, source)