From d3c4d14a409cf63c3a44bc8974ae1571ab556045 Mon Sep 17 00:00:00 2001
From: Jay Turner <jaynicholasturner@gmail.com>
Date: Sun, 3 Feb 2019 17:59:17 +0000
Subject: [PATCH 1/2] AttributeError: 'Command' object has no attribute
 'option_list'

There is a bug in the command in which option_list doesn't exist and thus, cannot be added to.
---
 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 b2788762..4c8cafe4 100644
--- a/helpdesk/management/commands/escalate_tickets.py
+++ b/helpdesk/management/commands/escalate_tickets.py
@@ -32,7 +32,7 @@ class Command(BaseCommand):
     def __init__(self):
         BaseCommand.__init__(self)
 
-        self.option_list += (
+        self.option_list = (
             make_option(
                 '--queues',
                 help='Queues to include (default: all). Use queue slugs'),

From 72d35232a1dead480a692655f280afe57aa39e37 Mon Sep 17 00:00:00 2001
From: Jay Turner <jaynicholasturner@gmail.com>
Date: Sun, 3 Feb 2019 18:03:27 +0000
Subject: [PATCH 2/2] Fix key errors

KeyError: 'verboseescalation' comes up if the key isn't defined.
---
 helpdesk/management/commands/escalate_tickets.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helpdesk/management/commands/escalate_tickets.py b/helpdesk/management/commands/escalate_tickets.py
index 4c8cafe4..f7468182 100644
--- a/helpdesk/management/commands/escalate_tickets.py
+++ b/helpdesk/management/commands/escalate_tickets.py
@@ -48,9 +48,9 @@ class Command(BaseCommand):
         queue_slugs = None
         queues = []
 
-        if options['verboseescalation']:
+        if 'verboseescalation' in options:
             verbose = True
-        if options['queues']:
+        if 'queues' in options:
             queue_slugs = options['queues']
 
         if queue_slugs is not None: