Validation fix when creating a new host
This commit is contained in:
parent
ae37067a74
commit
6f26bc4c71
@ -144,13 +144,14 @@ class SystemController extends Controller
|
||||
// Check that the region doesnt already exist
|
||||
$o = Address::where(function($query) use ($request,$value) {
|
||||
return $query
|
||||
->where('zone_id',$request->post('zone_id'))
|
||||
->where('host_id',$request->post('host_id'))
|
||||
->where('node_id',$value)
|
||||
->where('point_id',0);
|
||||
});
|
||||
|
||||
if ($o->count()) {
|
||||
$fail('Host already exists');
|
||||
$fail(sprintf('Host already exists: %s',$o->get()->pluck('ftn')->join(',')));
|
||||
}
|
||||
},
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user