Check that location isset in checkout

This commit is contained in:
snipe 2020-04-09 18:32:34 -07:00
parent 197a84be94
commit 5707df0239
No known key found for this signature in database
GPG key ID: 10BFFDA3ED34B5AC

View file

@ -226,10 +226,10 @@ class Asset extends Depreciable
if ($location != null) {
$this->location_id = $location;
} else {
if($target->location) {
if (isset($target->location)) {
$this->location_id = $target->location->id;
}
if($target instanceof Location) {
if ($target instanceof Location) {
$this->location_id = $target->id;
}
}