Improved error handling for assets if recored got deleted in meantime.
This commit is contained in:
parent
3e50a06306
commit
9637d1200e
2 changed files with 5 additions and 1 deletions
|
@ -33,7 +33,9 @@ returns
|
||||||
end
|
end
|
||||||
if !data[ app_model_ticket ][ ticket_id ]
|
if !data[ app_model_ticket ][ ticket_id ]
|
||||||
ticket = Ticket.lookup(id: ticket_id)
|
ticket = Ticket.lookup(id: ticket_id)
|
||||||
data = ticket.assets(data)
|
if ticket
|
||||||
|
data = ticket.assets(data)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !data[ app_model_article ]
|
if !data[ app_model_article ]
|
||||||
|
|
|
@ -61,6 +61,8 @@ returns
|
||||||
next if data[:Role] && data[:Role][role_id]
|
next if data[:Role] && data[:Role][role_id]
|
||||||
|
|
||||||
role = Role.lookup(id: role_id)
|
role = Role.lookup(id: role_id)
|
||||||
|
next if !role
|
||||||
|
|
||||||
data = role.assets(data)
|
data = role.assets(data)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue