Fix code compatibility with 2x version

This commit is contained in:
Son NK 2020-04-14 22:42:20 +02:00
parent 75f43eefdc
commit 1410d5617f
1 changed files with 1 additions and 1 deletions

View File

@ -826,7 +826,7 @@ class Contact(db.Model, ModelMixin):
`new_email` is a special reply address
"""
user = self.user
if user.use_via_format_for_sender:
if user and user.use_via_format_for_sender:
new_name = f"{self.website_email} via SimpleLogin"
else:
name = self.name or ""