Check that location isset in checkout

This commit is contained in:
snipe
2020-04-09 18:32:34 -07:00
parent 197a84be94
commit 5707df0239
+2 -2
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;
}
}