mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
Merge pull request #14421 from marcusmoore/fixes/add-minimal-validation-around-asset-tags
Adds a minimal amount of validation around asset_tags in AssetsController
This commit is contained in:
commit
7c39f516b9
|
@ -102,6 +102,10 @@ class AssetsController extends Controller
|
||||||
{
|
{
|
||||||
$this->authorize(Asset::class);
|
$this->authorize(Asset::class);
|
||||||
|
|
||||||
|
// There are a lot more rules to add here but prevents
|
||||||
|
// errors around `asset_tags` not being present below.
|
||||||
|
$this->validate($request, ['asset_tags' => ['required', 'array']]);
|
||||||
|
|
||||||
// Handle asset tags - there could be one, or potentially many.
|
// Handle asset tags - there could be one, or potentially many.
|
||||||
// This is only necessary on create, not update, since bulk editing is handled
|
// This is only necessary on create, not update, since bulk editing is handled
|
||||||
// differently
|
// differently
|
||||||
|
|
Loading…
Reference in a new issue