Improved error handling if ticket got deleted in the meantime.

This commit is contained in:
Martin Edenhofer 2019-02-18 11:46:36 +01:00
parent 6aa189ee09
commit 4dcc82a01a

View file

@ -37,7 +37,9 @@ class Transaction::Slack
return if !config
return if !config['items']
ticket = Ticket.find(@item[:object_id])
ticket = Ticket.find_by(id: @item[:object_id])
return if !ticket
if @item[:article_id]
article = Ticket::Article.find(@item[:article_id])