Fix removing stock reminder threshold [SCI-6724] (#4010)

This commit is contained in:
artoscinote 2022-04-13 11:35:45 +02:00 committed by GitHub
parent ee26204af2
commit 04ab92b8e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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