From 899d56434aef9a2b49fdec97c354bb5df876856c Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Fri, 24 Jul 2015 12:03:28 +0200 Subject: [PATCH] Each article should get added in an own transaction. --- lib/import/otrs.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/import/otrs.rb b/lib/import/otrs.rb index 50df41f6f..c440d9bf0 100644 --- a/lib/import/otrs.rb +++ b/lib/import/otrs.rb @@ -589,8 +589,8 @@ module Import::OTRS _article_based_customers(article) } - ActiveRecord::Base.transaction do - record['Articles'].each { |article| + record['Articles'].each do |article| + ActiveRecord::Base.transaction do # get article values article_new = { @@ -681,7 +681,7 @@ module Import::OTRS created_by_id: 1, ) } - } + end end #puts "HS: #{record['History'].inspect}"