mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Remove unnecessary try/catch
This commit is contained in:
parent
e0b2dc043a
commit
95f568b934
|
@ -459,11 +459,7 @@ class UsersController extends Controller
|
|||
}
|
||||
// The groups field has been passed but it is null, so we should blank it out
|
||||
} elseif ($request->has('groups')) {
|
||||
try{
|
||||
$user->groups()->sync([]);
|
||||
} catch (\Exception $exception){
|
||||
return response()->json(Helper::formatStandardApiResponse('error', null, $exception));
|
||||
}
|
||||
$user->groups()->sync([]);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue