Update nodelist import to exclude systems managed by us
This commit is contained in:
parent
ff04de52b5
commit
d11a2a5b8d
@ -444,11 +444,18 @@ class NodelistImport implements ShouldQueue
|
|||||||
$so->baud = $fields[6];
|
$so->baud = $fields[6];
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($so->users->count() && $so->getDirty()) {
|
if ($so->getDirty()) {
|
||||||
|
if ($so->users->count()) {
|
||||||
Log::alert(sprintf('%s:! Refusing to update a system managed by a user',self::LOGKEY),['dirty'=>$so->getDirty()]);
|
Log::alert(sprintf('%s:! Refusing to update a system managed by a user',self::LOGKEY),['dirty'=>$so->getDirty()]);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($so->sessions()->count()) {
|
||||||
|
Log::alert(sprintf('%s:! Refusing to update a system configured here',self::LOGKEY),['dirty'=>$so->getDirty()]);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Save the system record
|
// Save the system record
|
||||||
try {
|
try {
|
||||||
$so->save();
|
$so->save();
|
||||||
|
Loading…
Reference in New Issue
Block a user