mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Allow updating asset default location when checking in asset via api
This commit is contained in:
parent
3ae8adfbf9
commit
2df026bcb5
|
@ -890,6 +890,10 @@ class AssetsController extends Controller
|
|||
|
||||
if ($request->filled('location_id')) {
|
||||
$asset->location_id = $request->input('location_id');
|
||||
|
||||
if ($request->get('update_default_location') == 0){
|
||||
$asset->rtd_location_id = $request->get('location_id');
|
||||
}
|
||||
}
|
||||
|
||||
if ($request->has('status_id')) {
|
||||
|
|
|
@ -89,8 +89,6 @@ class AssetCheckinTest extends TestCase
|
|||
|
||||
public function testDefaultLocationCanBeUpdatedUponCheckin()
|
||||
{
|
||||
$this->markTestIncomplete('Not currently in controller');
|
||||
|
||||
$location = Location::factory()->create();
|
||||
$asset = Asset::factory()->assignedToUser()->create();
|
||||
|
||||
|
|
Loading…
Reference in a new issue