Improved error handling for assets if recored got deleted in meantime.

This commit is contained in:
Martin Edenhofer 2019-02-12 08:27:04 +01:00 committed by Martin Edenhofer
parent 3e50a06306
commit 9637d1200e
2 changed files with 5 additions and 1 deletions

View file

@ -33,7 +33,9 @@ returns
end
if !data[ app_model_ticket ][ ticket_id ]
ticket = Ticket.lookup(id: ticket_id)
data = ticket.assets(data)
if ticket
data = ticket.assets(data)
end
end
if !data[ app_model_article ]

View file

@ -61,6 +61,8 @@ returns
next if data[:Role] && data[:Role][role_id]
role = Role.lookup(id: role_id)
next if !role
data = role.assets(data)
end