Add also ticket to article assets.

This commit is contained in:
Martin Edenhofer 2013-09-23 09:04:16 +02:00
parent ef6f5ef78f
commit 3b6a101c51

View file

@ -23,6 +23,14 @@ returns
def assets (data) def assets (data)
if !data[ Ticket.to_app_model ]
data[ Ticket.to_app_model ] = {}
end
if !data[ Ticket.to_app_model ][ self.ticket_id ]
ticket = Ticket.find( self.ticket_id )
data = ticket.assets(data)
end
if !data[ Ticket::Article.to_app_model ] if !data[ Ticket::Article.to_app_model ]
data[ Ticket::Article.to_app_model ] = {} data[ Ticket::Article.to_app_model ] = {}
end end