Merge pull request #13439 from snipe/fixes/500_error_when_cloning_invalid_accessory
Fixed route for accessory index
This commit is contained in:
commit
a1cfa45344
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ class AccessoriesController extends Controller
|
||||||
// Check if the asset exists
|
// Check if the asset exists
|
||||||
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
|
if (is_null($accessory_to_clone = Accessory::find($accessoryId))) {
|
||||||
// Redirect to the asset management page
|
// Redirect to the asset management page
|
||||||
return redirect()->route('accessory.index')->with('error', trans('admin/accessories/message.does_not_exist'));
|
return redirect()->route('accessories.index')
|
||||||
|
->with('error', trans('admin/accessories/message.does_not_exist', ['id' => $accessoryId]));
|
||||||
}
|
}
|
||||||
|
|
||||||
$accessory = clone $accessory_to_clone;
|
$accessory = clone $accessory_to_clone;
|
||||||
|
|
Loading…
Add table
Reference in a new issue