From 391e9e1e39ddaa4a4a2e6a1ff20e44809e031f58 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 25 May 2024 11:08:33 +1000 Subject: [PATCH] Fix TicProcess, save() returns a bool, not the object --- app/Jobs/TicProcess.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Jobs/TicProcess.php b/app/Jobs/TicProcess.php index aa8b56f..2708558 100644 --- a/app/Jobs/TicProcess.php +++ b/app/Jobs/TicProcess.php @@ -63,8 +63,7 @@ class TicProcess implements ShouldQueue $to = new Tic; try { - $fo = $to->load($this->file) - ->save(); + $fo = $to->load($this->file); } catch (\Exception $e) { Log::error(sprintf('%s:! Error loading TIC file [%s] (%s)',self::LOGKEY,$rel_name,$e->getMessage())); @@ -72,6 +71,8 @@ class TicProcess implements ShouldQueue return; } + $fo->save(); + Log::info(sprintf('%s:= Processed [%s] storing [%s] as id [%d]',self::LOGKEY,$this->file,$to->file->name,$to->file->id)); if (config('fido.packet_keep')) { @@ -99,6 +100,6 @@ class TicProcess implements ShouldQueue } if ($to->isNodelist()) - NodelistImport::dispatch($fo,$this->domain); + NodelistImport::dispatch($fo->withoutRelations(),$this->domain); } } \ No newline at end of file