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

@@ -39,7 +39,7 @@ class EchoareaImport implements ShouldQueue
{
$this->file = $file;
$this->do = $do;
$this->prefix = $prefix;
$this->prefix = $prefix ?: '';
$this->delete_file = $delete_file;
$this->delete_recs = $delete_recs;
}

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)