From 70e47f3929eaed07b951adca36b12b2fbbfc8728 Mon Sep 17 00:00:00 2001 From: Mohamed ABDELLANI Date: Tue, 8 Nov 2022 10:20:28 +0100 Subject: [PATCH] fix: convert @attrs[:units] to big decimal instead of float in the unit converter --- app/models/product_import/unit_converter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/product_import/unit_converter.rb b/app/models/product_import/unit_converter.rb index a7434912b3..da72684204 100644 --- a/app/models/product_import/unit_converter.rb +++ b/app/models/product_import/unit_converter.rb @@ -54,7 +54,7 @@ module ProductImport end def assign_weight_or_volume_attributes - units = @attrs['units'].to_f + units = @attrs['units'].to_d unit_type = @attrs['unit_type'].to_s.downcase return unless valid_unit_type? unit_type