From 7db252ade32182adde8fa73b71b5c7f42bd18c7d Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 19 Mar 2022 23:11:42 +0000 Subject: [PATCH] Fixed #10840 - defaulting to 0 on supplier ID if no value provided Signed-off-by: snipe --- app/Http/Controllers/Assets/AssetsController.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index c5063eb598..b7afc00bdb 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -137,12 +137,12 @@ class AssetsController extends Controller $asset->archived = '0'; $asset->physical = '1'; $asset->depreciate = '0'; - $asset->status_id = request('status_id', 0); + $asset->status_id = request('status_id'); $asset->warranty_months = request('warranty_months', null); $asset->purchase_cost = Helper::ParseCurrency($request->get('purchase_cost')); $asset->purchase_date = request('purchase_date', null); $asset->assigned_to = request('assigned_to', null); - $asset->supplier_id = request('supplier_id', 0); + $asset->supplier_id = request('supplier_id', null); $asset->requestable = request('requestable', 0); $asset->rtd_location_id = request('rtd_location_id', null);