mirror of
https://gitea.mueller.network/extern/django-helpdesk.git
synced 2024-11-21 23:43:11 +01:00
Check for model enabled before registering
This commit is contained in:
parent
280462c2fe
commit
fb21d9bcdc
@ -1,7 +1,7 @@
|
||||
from django.contrib import admin
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply, KBCategory
|
||||
from helpdesk.models import EscalationExclusion, EmailTemplate, KBItem
|
||||
from helpdesk.models import Queue, Ticket, FollowUp, PreSetReply
|
||||
from helpdesk.models import EscalationExclusion, EmailTemplate
|
||||
from helpdesk.models import TicketChange, KBIAttachment, FollowUpAttachment, IgnoreEmail
|
||||
from helpdesk.models import CustomField
|
||||
from helpdesk import settings as helpdesk_settings
|
||||
@ -82,9 +82,10 @@ if helpdesk_settings.HELPDESK_KB_ENABLED:
|
||||
|
||||
list_display_links = ('title',)
|
||||
|
||||
@admin.register(KBCategory)
|
||||
class KBCategoryAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'title', 'slug', 'public')
|
||||
if helpdesk_settings.HELPDESK_KB_ENABLED:
|
||||
@admin.register(KBCategory)
|
||||
class KBCategoryAdmin(admin.ModelAdmin):
|
||||
list_display = ('name', 'title', 'slug', 'public')
|
||||
|
||||
|
||||
@admin.register(CustomField)
|
||||
|
Loading…
Reference in New Issue
Block a user