From 7716eb69a91b4312331cdcfefb3ee26343bdd93a Mon Sep 17 00:00:00 2001 From: digitalpbk Date: Sun, 7 Oct 2012 14:16:57 +0530 Subject: [PATCH] assigned_to.usersettings.settings is a dictionary t.assigned_to.usersettings.settings is a dictionary, so getattr does not work --- helpdesk/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/forms.py b/helpdesk/forms.py index 9951a6fd..f3c33dc7 100644 --- a/helpdesk/forms.py +++ b/helpdesk/forms.py @@ -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,