Improved error handling if ticket got deleted in the meantime.
This commit is contained in:
parent
6aa189ee09
commit
4dcc82a01a
1 changed files with 3 additions and 1 deletions
|
@ -37,7 +37,9 @@ class Transaction::Slack
|
||||||
return if !config
|
return if !config
|
||||||
return if !config['items']
|
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]
|
if @item[:article_id]
|
||||||
article = Ticket::Article.find(@item[:article_id])
|
article = Ticket::Article.find(@item[:article_id])
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue