From 9403b4fd674f82da3410e0d3df8595cf185943a5 Mon Sep 17 00:00:00 2001 From: Martin Artnik Date: Wed, 17 Jul 2024 12:00:00 +0200 Subject: [PATCH] Fix import of stock units [SCI-10893] --- app/utilities/repository_import_parser/importer.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/utilities/repository_import_parser/importer.rb b/app/utilities/repository_import_parser/importer.rb index 8e492b03d..4fcb6ca83 100644 --- a/app/utilities/repository_import_parser/importer.rb +++ b/app/utilities/repository_import_parser/importer.rb @@ -227,7 +227,14 @@ module RepositoryImportParser if repository_cell.present? case cell_value when RepositoryStockValue - repository_cell.value.update_data!(cell_value, @user, preview: @preview) + repository_cell.value.update_data!( + { + amount: cell_value.amount, + unit_item_id: cell_value.repository_stock_unit_item_id + }, + @user, + preview: @preview + ) when RepositoryListValue repository_list_item_id = cell_value[:repository_list_item_id] repository_cell.value.update_data!(repository_list_item_id, @user, preview: @preview)