diff --git a/app/Http/Controllers/ZoneController.php b/app/Http/Controllers/ZoneController.php index 20d5564..17babe0 100644 --- a/app/Http/Controllers/ZoneController.php +++ b/app/Http/Controllers/ZoneController.php @@ -112,7 +112,7 @@ class ZoneController extends Controller $default = $o->systems->where('pivot.default',TRUE); - if ($default->first()->addresses->pluck('role')->search(DomainController::NODE_ZC) !== FALSE) + if ($default->count() && $default->first()->addresses->pluck('role')->search(DomainController::NODE_ZC) !== FALSE) abort(412); if ($default->count() && ($default->first()->id != $request->sid)) diff --git a/resources/views/system/addedit.blade.php b/resources/views/system/addedit.blade.php index 6fab553..8636543 100644 --- a/resources/views/system/addedit.blade.php +++ b/resources/views/system/addedit.blade.php @@ -65,7 +65,7 @@ use App\Http\Controllers\DomainController as DC; @if(($x=$oo->systems->where('pivot.default',TRUE))->count() && ($x->first()->id !== $o->id)) @else - + @endif {{ $oo->pivot->sespass }} @@ -288,7 +288,7 @@ use App\Http\Controllers\DomainController as DC; @section('page-scripts')