Skip to content

Commit

Permalink
Fixed #7270 - Checking-in Assets via API Removes the Item's Asset Name
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 26, 2019
1 parent 9af9ed9 commit ab86e42
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/Http/Controllers/Api/AssetsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,11 @@ public function checkin(Request $request, $asset_id)
$asset->assigned_to = null;
$asset->assignedTo()->disassociate($asset);
$asset->accepted = null;
$asset->name = Input::get('name');

if ($request->filled('name')) {
$asset->name = $request->input('name');
}

$asset->location_id = $asset->rtd_location_id;

if ($request->filled('location_id')) {
Expand Down

0 comments on commit ab86e42

Please sign in to comment.