Update mailer app to comply with MERCs 5 and 6

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2018-12-31 04:02:15 -04:00
parent 35ef8ba7b8
commit 7f3b28aec8
12 changed files with 173 additions and 112 deletions
+4 -2
View File
@@ -114,7 +114,7 @@ class UserMailer(models.Model):
"""
Deserialize the stored backend data.
"""
return json.loads(self.backend_data)
return json.loads(s=self.backend_data)
def natural_key(self):
return (self.label,)
@@ -150,7 +150,9 @@ class UserMailer(models.Model):
mimetype=attachment['mimetype']
)
email_message.attach_alternative(body, 'text/html')
email_message.attach_alternative(
content=body, mimetype='text/html'
)
try:
email_message.send()