Fixed runtime error if no signature is defined for group.

This commit is contained in:
Martin Edenhofer 2012-10-03 21:45:04 +02:00
parent 84dfdc2b63
commit b8b02ca845

View file

@ -268,16 +268,19 @@ class TicketsController < ApplicationController
log_view( ticket )
# get signature
signature = ticket.group.signature.attributes
signature = {}
if ticket.group.signature
signature = ticket.group.signature.attributes
# replace tags
signature['body'] = NotificationFactory.build(
:string => signature['body'],
:objects => {
:ticket => ticket,
:user => current_user,
}
)
# replace tags
signature['body'] = NotificationFactory.build(
:string => signature['body'],
:objects => {
:ticket => ticket,
:user => current_user,
}
)
end
# get related articles
ticket = ticket.attributes