mirror of
https://github.com/snipe/snipe-it.git
synced 2025-02-21 03:15:45 -08:00
Check that location isset in checkout
This commit is contained in:
parent
197a84be94
commit
5707df0239
|
@ -226,10 +226,10 @@ class Asset extends Depreciable
|
||||||
if ($location != null) {
|
if ($location != null) {
|
||||||
$this->location_id = $location;
|
$this->location_id = $location;
|
||||||
} else {
|
} else {
|
||||||
if($target->location) {
|
if (isset($target->location)) {
|
||||||
$this->location_id = $target->location->id;
|
$this->location_id = $target->location->id;
|
||||||
}
|
}
|
||||||
if($target instanceof Location) {
|
if ($target instanceof Location) {
|
||||||
$this->location_id = $target->id;
|
$this->location_id = $target->id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue