assigned_to.usersettings.settings is a dictionary

t.assigned_to.usersettings.settings is a dictionary, so getattr does not work
This commit is contained in:
digitalpbk 2012-10-07 14:16:57 +05:30
parent 6405da36e4
commit 7716eb69a9

View File

@ -320,7 +320,7 @@ class TicketForm(forms.Form):
)
messages_sent_to.append(t.submitter_email)
if t.assigned_to and t.assigned_to != user and getattr(t.assigned_to.usersettings.settings, 'email_on_ticket_assign', False) and t.assigned_to.email and t.assigned_to.email not in messages_sent_to:
if t.assigned_to and t.assigned_to != user and t.assigned_to.usersettings.settings.get('email_on_ticket_assign', False) and t.assigned_to.email and t.assigned_to.email not in messages_sent_to:
send_templated_mail(
'assigned_owner',
context,