Skip to content

Commit

Permalink
Merge pull request #297 from madd15/patch-4
Browse files Browse the repository at this point in the history
Changed rtd_location_id for edit to match create
  • Loading branch information
snipe committed Oct 24, 2014
2 parents 8d2b09a + dd92398 commit e61f93d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/admin/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,12 @@ public function postEdit($assetId = null)
} else {
$asset->requestable = e(Input::get('requestable'));
}

if (e(Input::get('rtd_location_id')) == '') {
$asset->rtd_location_id = 0;
} else {
$asset->rtd_location_id = e(Input::get('rtd_location_id'));
}

// Update the asset data
$asset->name = e(Input::get('name'));
Expand All @@ -354,7 +360,6 @@ public function postEdit($assetId = null)
$asset->asset_tag = e(Input::get('asset_tag'));
$asset->notes = e(Input::get('notes'));
$asset->physical = '1';
$asset->rtd_location_id = e(Input::get('rtd_location_id'));

// Was the asset updated?
if($asset->save()) {
Expand Down

0 comments on commit e61f93d

Please sign in to comment.