diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index e5085d7a2..55ed0e2be 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -240,7 +240,10 @@ class RepositoriesController < ApplicationController copied_repo_stock_column = copied_repository.repository_columns.find_by(data_type: 'RepositoryStockValue') if old_repo_stock_column && copied_repo_stock_column - copied_repo_stock_column.repository_stock_unit_items = old_repo_stock_column.repository_stock_unit_items + old_repo_stock_column.repository_stock_unit_items.each do |item| + copied_item = item.dup + copied_repo_stock_column.repository_stock_unit_items << copied_item + end copied_repository.save! end