Multiple exception bug fixes identified during testing

This commit is contained in:
Deon George
2021-10-07 23:32:05 +11:00
parent d0d6990d39
commit 83e06908b0
5 changed files with 19 additions and 6 deletions

View File

@@ -295,9 +295,13 @@ class NodelistImport implements ShouldQueue
// We'll search and see if we already have that system
} else {
$so = System::where('mailer_address',$address)
->where('mailer_port',$port)
->single();
// If we dont have $address/port
$so = NULL;
if ($address && $port)
$so = System::where('mailer_address',$address)
->where('mailer_port',$port)
->single();
if (! $so)
$so = System::where('name',$system)