Skip to content

Commit

Permalink
Fixes #81
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed Jul 26, 2024
1 parent 756fda0 commit b3bc712
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/article_version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,10 @@ def minimum_order_quantity=(value)
if value.blank?
self[:minimum_order_quantity] = nil
else
value = value.gsub(I18n.t('number.format.separator'), '.') if value.is_a?(String)
begin
value = value.to_i if Float(value) % 1 == 0
rescue ArgumentException
rescue ArgumentError
# not any number -> let validation handle this
end
super(value)
Expand Down

0 comments on commit b3bc712

Please sign in to comment.