For nodelist import, find based on mailer_address first
This commit is contained in:
parent
7e176d7bc1
commit
ff2b246d31
@ -295,14 +295,13 @@ class NodelistImport implements ShouldQueue
|
||||
|
||||
// We'll search and see if we already have that system
|
||||
} else {
|
||||
$so = System::where(function ($q) use ($system,$sysop) {
|
||||
return $q->where('name',$system)
|
||||
->where('sysop',$sysop);
|
||||
})
|
||||
->orWhere(function ($q) use ($address,$port) {
|
||||
return $q->where('mailer_address',$address)
|
||||
->where('mailer_port',$port);
|
||||
})
|
||||
$so = System::where('mailer_address',$address)
|
||||
->where('mailer_port',$port)
|
||||
->single();
|
||||
|
||||
if (! $so)
|
||||
$so = System::where('name',$system)
|
||||
->where('sysop',$sysop)
|
||||
->firstOrNew();
|
||||
|
||||
if ($so->exists)
|
||||
|
Loading…
Reference in New Issue
Block a user