Fix improper allocation id validation on API

This commit is contained in:
Dane Everitt 2018-02-07 22:50:22 -06:00
parent a9c1946319
commit db29b04c39
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 1 additions and 2 deletions

View file

@ -101,7 +101,6 @@ class StoreServerRequest extends ApplicationApiRequest
$validator->sometimes('allocation.default', [
'required', 'integer', 'bail',
Rule::exists('allocations', 'id')->where(function ($query) {
$query->where('node_id', $this->input('node_id'));
$query->whereNull('server_id');
}),
], function ($input) {
@ -111,7 +110,6 @@ class StoreServerRequest extends ApplicationApiRequest
$validator->sometimes('allocation.additional.*', [
'integer',
Rule::exists('allocations', 'id')->where(function ($query) {
$query->where('node_id', $this->input('node_id'));
$query->whereNull('server_id');
}),
], function ($input) {