adding support for images as knowledgebase attachment

This commit is contained in:
Jachym Cepicky
2019-03-07 21:58:04 +01:00
parent 37be1346cd
commit 9127275557
9 changed files with 161 additions and 40 deletions

View File

@ -15,7 +15,7 @@ from django.db.models import Q
from django.utils.encoding import smart_text, smart_str
from django.utils.safestring import mark_safe
from helpdesk.models import Attachment, EmailTemplate
from helpdesk.models import FollowUpAttachment, EmailTemplate
from model_utils import Choices
@ -218,7 +218,7 @@ def process_attachments(followup, attached_files):
if attached.size:
filename = smart_text(attached.name)
att = Attachment(
att = FollowUpAttachment(
followup=followup,
file=attached,
filename=filename,