mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-13 09:04:09 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
3a4e20ae82
|
@ -59,6 +59,12 @@ class LicenseCheckinController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$license = License::find($licenseSeat->license_id);
|
$license = License::find($licenseSeat->license_id);
|
||||||
|
|
||||||
|
// LicenseSeat is not assigned, it can't be checked in
|
||||||
|
if (is_null($licenseSeat->assignedTo) && is_null($licenseSeat->asset_id)) {
|
||||||
|
return redirect()->route('licenses.index')->with('error', trans('admin/licenses/message.checkin.error'));
|
||||||
|
}
|
||||||
|
|
||||||
$this->authorize('checkout', $license);
|
$this->authorize('checkout', $license);
|
||||||
|
|
||||||
if (! $license->reassignable) {
|
if (! $license->reassignable) {
|
||||||
|
|
|
@ -93,8 +93,12 @@ trait Loggable
|
||||||
{
|
{
|
||||||
$settings = Setting::getSettings();
|
$settings = Setting::getSettings();
|
||||||
$log = new Actionlog;
|
$log = new Actionlog;
|
||||||
$log->target_type = get_class($target);
|
|
||||||
$log->target_id = $target->id;
|
if($target != null){
|
||||||
|
$log->target_type = get_class($target);
|
||||||
|
$log->target_id = $target->id;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (static::class == LicenseSeat::class) {
|
if (static::class == LicenseSeat::class) {
|
||||||
$log->item_type = License::class;
|
$log->item_type = License::class;
|
||||||
|
|
Loading…
Reference in a new issue