fix public homepage with kb_category but without kb disabled

This commit is contained in:
Cedric Carrard
2019-03-15 13:57:43 +01:00
parent c314d515c1
commit e4d6a54659
2 changed files with 13 additions and 1 deletions

View File

@ -87,7 +87,10 @@ def homepage(request):
form.fields['queue'].choices = [('', '--------')] + [
(q.id, q.title) for q in Queue.objects.filter(allow_public_submission=True)]
knowledgebase_categories = KBCategory.objects.all()
knowledgebase_categories = None
if helpdesk_settings.HELPDESK_KB_ENABLED:
knowledgebase_categories = KBCategory.objects.all()
return render(request, 'helpdesk/public_homepage.html', {
'form': form,