mirror of
https://github.com/simple-login/app.git
synced 2025-02-24 07:43:54 +08:00
force convert contact_from_header to string
This commit is contained in:
parent
2619333cc6
commit
f3244eb274
1 changed files with 2 additions and 0 deletions
|
@ -106,6 +106,8 @@ def get_or_create_contact(contact_from_header: str, alias: Alias) -> Contact:
|
|||
"""
|
||||
contact_from_header is the RFC 2047 format FROM header
|
||||
"""
|
||||
# force convert header to string, sometimes contact_from_header is Header object
|
||||
contact_from_header = str(contact_from_header)
|
||||
contact_name, contact_email = parseaddr_unicode(contact_from_header)
|
||||
contact = Contact.get_by(alias_id=alias.id, website_email=contact_email)
|
||||
if contact:
|
||||
|
|
Loading…
Reference in a new issue