mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Merge pull request #14192 from inietov/fixes/api_issue_checkin_licenses
Fixed #14183 API /hardware/:id/checkin doesn't return Licenses
This commit is contained in:
commit
54552fc95c
|
@ -906,6 +906,13 @@ class AssetsController extends Controller
|
|||
$originalValues['action_date'] = $checkin_at;
|
||||
}
|
||||
|
||||
if(!empty($asset->licenseseats->all())){
|
||||
foreach ($asset->licenseseats as $seat){
|
||||
$seat->assigned_to = null;
|
||||
$seat->save();
|
||||
}
|
||||
}
|
||||
|
||||
if ($asset->save()) {
|
||||
event(new CheckoutableCheckedIn($asset, $target, Auth::user(), $request->input('note'), $checkin_at, $originalValues));
|
||||
|
||||
|
|
Loading…
Reference in a new issue