mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
* Fixed #6301: Do not allow duplicate asset tags * Display error message for single asset_tag failure
This commit is contained in:
parent
b8f8d49927
commit
704209de9c
|
@ -171,8 +171,8 @@ class AssetsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
// Was the asset created?
|
||||
if ($asset->save()) {
|
||||
// Validate the asset before saving
|
||||
if ($asset->isValid() && $asset->save()) {
|
||||
|
||||
if (request('assigned_user')) {
|
||||
$target = User::find(request('assigned_user'));
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
</div>
|
||||
@endif
|
||||
{!! $errors->first('asset_tags', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
{!! $errors->first('asset_tag', '<span class="alert-msg"><i class="fa fa-times"></i> :message</span>') !!}
|
||||
</div>
|
||||
@include ('partials.forms.edit.serial', ['fieldname'=> 'serials[1]', 'translated_serial' => trans('admin/hardware/form.serial')])
|
||||
|
||||
|
|
Loading…
Reference in a new issue