Checkout update locationid (#5919)

* Fix missing punctuation.  Bad merge.

* If we're checking out to an location, use it's id instead of location_id
This commit is contained in:
Daniel Meltzer 2018-07-23 09:47:21 -04:00 committed by snipe
parent 3bc43210ab
commit 059126f642
2 changed files with 4 additions and 1 deletions

View file

@ -250,7 +250,7 @@ class UsersController extends Controller
} catch (ModelNotFoundException $e) { } catch (ModelNotFoundException $e) {
return redirect()->route('users.index') 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')));
} }

View file

@ -228,6 +228,9 @@ class Asset extends Depreciable
if($target->location) { if($target->location) {
$this->location_id = $target->location->id; $this->location_id = $target->location->id;
} }
if($target instanceof Location) {
$this->location_id = $target->id;
}
} }
/** /**