fix: convert @attrs[:units] to big decimal instead of float in the unit converter

This commit is contained in:
Mohamed ABDELLANI
2022-11-08 10:20:28 +01:00
parent b203803eb9
commit 70e47f3929

View File

@@ -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