From d49b713ccd4d3ff1b79fb0dcd979e3904bbec7dd Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Sun, 5 Sep 2021 17:05:39 +0300 Subject: [PATCH] fixes --- application/Espo/Controllers/Import.php | 1 - application/Espo/Tools/Import/Params.php | 4 ++-- application/Espo/Tools/Import/Service.php | 5 ++--- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/application/Espo/Controllers/Import.php b/application/Espo/Controllers/Import.php index 55b1e790f2..c843f1e97c 100644 --- a/application/Espo/Controllers/Import.php +++ b/application/Espo/Controllers/Import.php @@ -29,7 +29,6 @@ namespace Espo\Controllers; -use Espo\Core\Exceptions\Forbidden; use Espo\Core\Exceptions\BadRequest; use Espo\Tools\Import\Params as ImportParams; diff --git a/application/Espo/Tools/Import/Params.php b/application/Espo/Tools/Import/Params.php index e965fc8abd..08ce737feb 100644 --- a/application/Espo/Tools/Import/Params.php +++ b/application/Espo/Tools/Import/Params.php @@ -346,12 +346,12 @@ class Params ->withIdleMode($raw->idleMode ?? false) ->withManualMode($raw->manualMode ?? false) ->withPersonNameFormat($raw->personNameFormat ?? null) - ->withSilentMode($raw->silentMode ?? null) + ->withSilentMode($raw->silentMode ?? false) ->withSkipDuplicateChecking($raw->skipDuplicateChecking ?? false) ->withStartFromLastIndex($raw->startFromLastIndex ?? false) ->withTextQualifier($raw->textQualifier ?? null) ->withTimeFormat($raw->timeFormat ?? false) - ->withTimezone($raw->timezone ?? false) + ->withTimezone($raw->timezone ?? null) ->withUpdateBy($raw->updateBy ?? []); return $obj; diff --git a/application/Espo/Tools/Import/Service.php b/application/Espo/Tools/Import/Service.php index 997aac751c..f1e716b233 100644 --- a/application/Espo/Tools/Import/Service.php +++ b/application/Espo/Tools/Import/Service.php @@ -119,7 +119,7 @@ class Service $entityType = $source->getTargetEntityType(); $attributeList = $source->getTargetAttributeList() ?? []; - $params = ImportParams::fromRaw($source->getParams()) + $params = Params::fromRaw($source->getParams()) ->withIdleMode(false) ->withManualMode(false); @@ -152,8 +152,7 @@ class Service $entityType = $import->getTargetEntityType(); $attributeList = $import->getTargetAttributeList() ?? []; - $params = ImportParams - ::fromRaw($import->getParams()) + $params = Params::fromRaw($import->getParams()) ->withStartFromLastIndex($startFromLastIndex); $attachmentId = $import->getFileId();