From b3bc712c3dcb0392f6b87cab85458de1b5d935a4 Mon Sep 17 00:00:00 2001 From: Florian Lentsch Date: Fri, 26 Jul 2024 16:04:26 +0200 Subject: [PATCH] Fixes #81 --- app/models/article_version.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/article_version.rb b/app/models/article_version.rb index b8e662a4..521fead9 100644 --- a/app/models/article_version.rb +++ b/app/models/article_version.rb @@ -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)