From 9ddd7fa33a6a4c436b6ab1623906ead731c1bbe5 Mon Sep 17 00:00:00 2001
From: "J.-S. Caux" <J.S.Caux@uva.nl>
Date: Thu, 6 Feb 2020 08:56:11 +0100
Subject: [PATCH] Quick debug

---
 apimail/views.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/apimail/views.py b/apimail/views.py
index cd54b1cb9..396a0aac1 100644
--- a/apimail/views.py
+++ b/apimail/views.py
@@ -15,10 +15,10 @@ def attachment_file(request, uuid):
     Return an attachment file.
     """
     att = get_object_or_404(AttachmentFile, uuid=uuid)
-    content_type, encoding = mimetypes.guess_type(att.attachment_file.path)
+    content_type, encoding = mimetypes.guess_type(att.file.path)
     content_type = content_type or 'application/octet-stream'
-    response = HttpResponse(att.attachment_file.read(), content_type=content_type)
+    response = HttpResponse(att.file.read(), content_type=content_type)
     response['Content-Disposition'] = (
-        'filename=%s' % att.attachment_file.name.rpartition('/')[2])
+        'filename=%s' % att.file.name.rpartition('/')[2])
     response["Content-Encoding"] = encoding
     return response
-- 
GitLab