From b4aafb0b54b6ac4556c7b71036dc00e903fec1f9 Mon Sep 17 00:00:00 2001 From: Timothy Hobbs Date: Wed, 12 Sep 2018 15:28:54 +0200 Subject: [PATCH] Fix knowledge base categories display on public homepage --- helpdesk/views/public.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/helpdesk/views/public.py b/helpdesk/views/public.py index e198eec0..886d9cee 100644 --- a/helpdesk/views/public.py +++ b/helpdesk/views/public.py @@ -57,12 +57,10 @@ class CreateTicketView(FormView): return HttpResponseRedirect(reverse('helpdesk:dashboard')) return super().dispatch(*args, **kwargs) - def get_context(self): - knowledgebase_categories = KBCategory.objects.all() - return { - 'helpdesk_settings': helpdesk_settings, - 'kb_categories': knowledgebase_categories - } + def get_context_data(self, **kwargs): + context = super().get_context_data(**kwargs) + context['kb_categories'] = KBCategory.objects.all() + return context def get_initial(self): request = self.request