diff options
author | Magnus Hagander | 2020-07-03 15:51:01 +0000 |
---|---|---|
committer | Magnus Hagander | 2020-07-03 16:05:47 +0000 |
commit | 59793b0ca7fd42e5317a5adb33faf1fd550a3714 (patch) | |
tree | 146a827256c8e5dc1ee49c1834c5d4c4aee34751 /pgweb/mailqueue/admin.py | |
parent | c1a5cf4c27ed2aae0c6a8525295956776ff08410 (diff) |
Fix message preview in mailqueue model
UTF8 encoding issues since the python3 migration...
Diffstat (limited to 'pgweb/mailqueue/admin.py')
-rw-r--r-- | pgweb/mailqueue/admin.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pgweb/mailqueue/admin.py b/pgweb/mailqueue/admin.py index 6b89205c..468283b6 100644 --- a/pgweb/mailqueue/admin.py +++ b/pgweb/mailqueue/admin.py @@ -17,13 +17,13 @@ class QueuedMailAdmin(admin.ModelAdmin): msg = parser.parsestr(obj.fullmsg) b = msg.get_payload(decode=True) if b: - return b + return b.decode('utf8') pl = msg.get_payload() for p in pl: b = p.get_payload(decode=True) if b: - return b + return b.decode('utf8') return "Could not find body" except Exception as e: return "Failed to get body: %s" % e |