File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 11"""
22Declare and configure the models for the messages core application
33"""
4- # pylint: disable=too-many-lines,too-many-instance-attributes,dangerous-default-value
4+ # pylint: disable=too-many-lines,too-many-instance-attributes
55
66import base64
77import hashlib
@@ -1825,7 +1825,7 @@ def render_template(
18251825 self ,
18261826 mailbox : Mailbox = None ,
18271827 user : User = None ,
1828- context : Dict [str , Any ] = {}, # noqa: B006
1828+ context : Optional [ Dict [str , Any ]] = None ,
18291829 ) -> Dict [str , str ]:
18301830 """
18311831 Render the template with the given context.
@@ -1837,7 +1837,7 @@ def render_template(
18371837 Returns:
18381838 Dictionary with 'html_body' and 'text_body' keys containing rendered content
18391839 """
1840- context = context .copy ()
1840+ context = context .copy () if context else {}
18411841 context ["name" ] = (
18421842 mailbox .contact .name
18431843 if mailbox and mailbox .contact
You can’t perform that action at this time.
0 commit comments