From 6d54db85074b094646db31f8f803dc923f324002 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 5 Jul 2022 08:26:41 +1000 Subject: [PATCH] Minor fixes for import --- app/Jobs/Util/Import.php | 7 ++++++- app/Utils/TemplateEngine.php | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 99549bd53224..b3d6cd822672 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -275,7 +275,12 @@ class Import implements ShouldQueue info('CompletedπŸš€πŸš€πŸš€πŸš€πŸš€ at '.now()); - unlink($this->file_path); + try{ + unlink($this->file_path); + } + catch(\Exception $e){ + nlog("problem unsetting file"); + } } private function fixData() diff --git a/app/Utils/TemplateEngine.php b/app/Utils/TemplateEngine.php index d481a33d24bf..a360a078cca1 100644 --- a/app/Utils/TemplateEngine.php +++ b/app/Utils/TemplateEngine.php @@ -84,9 +84,6 @@ class TemplateEngine public function build() { - - if ($this->template == 'email_template_null') - $this->template = 'email_template_purchase_order'; return $this->setEntity() ->setSettingsObject()