From f21f24f442e05fa452adac177cd0ba696e5f2c8f Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Sun, 17 Nov 2024 14:51:58 +0100 Subject: fix rendering of mails in home folder moved some logic into .read_mails.login --- src/jwebmail/render_mail.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jwebmail/render_mail.py') diff --git a/src/jwebmail/render_mail.py b/src/jwebmail/render_mail.py index eec6e30..c36150d 100644 --- a/src/jwebmail/render_mail.py +++ b/src/jwebmail/render_mail.py @@ -11,7 +11,7 @@ def render_text_html(_subtype, _content, path): if path: url = url_for( "read", - folder=request.view_args["folder"], + folder=request.view_args.get("folder", ""), msgid=request.view_args["msgid"], format="raw", path=".".join(map(str, path)), @@ -19,7 +19,7 @@ def render_text_html(_subtype, _content, path): else: url = url_for( "read", - folder=request.view_args["folder"], + folder=request.view_args.get("folder", ""), msgid=request.view_args["msgid"], format="raw", ) @@ -78,7 +78,7 @@ def render_multipart(_subtype, content, path): ref_url = url_for( "read", - folder=request.view_args["folder"], + folder=request.view_args.get("folder", ""), msgid=request.view_args["msgid"], path=".".join(map(str, [*path, i])), format="raw", -- cgit v1.2.3