Proper lookup.

This commit is contained in:
Thorsten Eckel 2015-07-21 13:15:56 +02:00
parent 0f95d68cb5
commit 4f3abbdf0e

View file

@ -634,7 +634,7 @@ module Import::OTRS
article_new[:type_id] = 9 article_new[:type_id] = 9
end end
article_new.delete( :type ) 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 # set state types
if article_old if article_old