Skip to content

A free open source IT asset/license management system

Checkout update locationid (#5919)

Daniel Meltzer059126f642d3
diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php
index c8e580273a..7afebbb946 100755
--- a/app/Http/Controllers/UsersController.php
+++ b/app/Http/Controllers/UsersController.php
@@ -250,7 +250,7 @@ class UsersController extends Controller
} catch (ModelNotFoundException $e) {
return redirect()->route('users.index')
- ->with('error', trans('admin/users/message.user_not_found', compact('id')))
+ ->with('error', trans('admin/users/message.user_not_found', compact('id')));
}
diff --git a/app/Models/Asset.php b/app/Models/Asset.php
index 891cfbb41a..631cf4a289 100644
--- a/app/Models/Asset.php
+++ b/app/Models/Asset.php
@@ -228,6 +228,9 @@ class Asset extends Depreciable
if($target->location) {
$this->location_id = $target->location->id;
}
+ if($target instanceof Location) {
+ $this->location_id = $target->id;
+ }
}
/**