From 4f3abbdf0e72c14c4dbf87863f561daff70c172f Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Tue, 21 Jul 2015 13:15:56 +0200 Subject: [PATCH] Proper lookup. --- lib/import/otrs.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/import/otrs.rb b/lib/import/otrs.rb index 9102b5dd0..d9e3df78e 100644 --- a/lib/import/otrs.rb +++ b/lib/import/otrs.rb @@ -634,7 +634,7 @@ module Import::OTRS article_new[:type_id] = 9 end article_new.delete( :type ) - article_old = Ticket::Article.where( id: article_new[:id] ).first + article_old = Ticket::Article.find_by( id: article_new[:id] ) # set state types if article_old