From 04ab92b8e250f19ff98fb726e7a455e6d4fc8f66 Mon Sep 17 00:00:00 2001 From: artoscinote <85488244+artoscinote@users.noreply.github.com> Date: Wed, 13 Apr 2022 11:35:45 +0200 Subject: [PATCH] Fix removing stock reminder threshold [SCI-6724] (#4010) --- app/models/repository_stock_value.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository_stock_value.rb b/app/models/repository_stock_value.rb index d87812290..05c84b02b 100644 --- a/app/models/repository_stock_value.rb +++ b/app/models/repository_stock_value.rb @@ -89,7 +89,7 @@ class RepositoryStockValue < ApplicationRecord end def update_data!(new_data, user) - self.low_stock_threshold = new_data[:low_stock_threshold] if new_data[:low_stock_threshold].present? + self.low_stock_threshold = new_data[:low_stock_threshold].presence if new_data[:low_stock_threshold] self.repository_stock_unit_item = repository_cell .repository_column .repository_stock_unit_items