Skip to content

Commit

Permalink
fix: convert @attrs[:units] to big decimal instead of float in the un…
Browse files Browse the repository at this point in the history
…it converter
  • Loading branch information
abdellani committed Nov 8, 2022
1 parent b203803 commit 70e47f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/product_import/unit_converter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def init_unit_values
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
Expand Down

0 comments on commit 70e47f3

Please sign in to comment.