From 84456aca238b7109e06ea4c4c452cd81fd07dc34 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 6 Jan 2020 20:23:35 -0500 Subject: [PATCH 1/2] Fixed syntax error --- helpdesk/management/commands/escalate_tickets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpdesk/management/commands/escalate_tickets.py b/helpdesk/management/commands/escalate_tickets.py index 122333f0..edbf7307 100644 --- a/helpdesk/management/commands/escalate_tickets.py +++ b/helpdesk/management/commands/escalate_tickets.py @@ -105,7 +105,7 @@ def escalate_tickets(queues, verbose): t.send( {'submitter': ('escalated_submitter', context), 'ticket_cc': ('escalated_cc', context), - 'assigned_to': ('escalated_owner', context)} + 'assigned_to': ('escalated_owner', context)}, fail_silently=True, ) From 377e1c325098cb29b74075e04e4edf1383ca1969 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 6 Jan 2020 22:18:48 -0500 Subject: [PATCH 2/2] Added better support for custom user models by not requiring a first_name attribute --- helpdesk/serializers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helpdesk/serializers.py b/helpdesk/serializers.py index c3b311b5..ef5ed27d 100644 --- a/helpdesk/serializers.py +++ b/helpdesk/serializers.py @@ -46,8 +46,8 @@ class DatatablesTicketSerializer(serializers.ModelSerializer): def get_assigned_to(self, obj): if obj.assigned_to: - if obj.assigned_to.first_name: - return (obj.assigned_to.first_name) + if obj.assigned_to.get_full_name(): + return (obj.assigned_to.get_full_name()) else: return (obj.assigned_to.email) else: