Merge pull request #15655 from Toreg87/fixes/api_asset_create_fmcs

Fixes #15654 Fix asset creation with API and FullMultipleCompanySupport
This commit is contained in:
snipe 2024-10-11 11:45:48 +01:00 committed by GitHub
commit e1a70023b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -598,6 +598,7 @@ class AssetsController extends Controller
$asset->model()->associate(AssetModel::find((int) $request->get('model_id')));
$asset->fill($request->validated());
$asset->company_id = Company::getIdForCurrentUser($request->validated()['company_id']);
$asset->created_by = auth()->id();
/**