From 357d34a42bc67289f358198dd65b911426bec2c3 Mon Sep 17 00:00:00 2001 From: MrMeeb Date: Thu, 31 Aug 2023 12:00:06 +0100 Subject: [PATCH] 4.34.4 --- app/app/account_linking.py | 3 ++- app/app/handler/unsubscribe_generator.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/app/account_linking.py b/app/app/account_linking.py index 57d389c..61fcc9a 100644 --- a/app/app/account_linking.py +++ b/app/app/account_linking.py @@ -12,6 +12,7 @@ from app.utils import sanitize_email from app.errors import ( AccountAlreadyLinkedToAnotherPartnerException, AccountIsUsingAliasAsEmail, + AccountAlreadyLinkedToAnotherUserException, ) from app.log import LOG from app.models import ( @@ -179,7 +180,7 @@ class ExistingUnlinkedUserStrategy(ClientMergeStrategy): class LinkedWithAnotherPartnerUserStrategy(ClientMergeStrategy): def process(self) -> LinkResult: - raise AccountAlreadyLinkedToAnotherPartnerException() + raise AccountAlreadyLinkedToAnotherUserException() def get_login_strategy( diff --git a/app/app/handler/unsubscribe_generator.py b/app/app/handler/unsubscribe_generator.py index 7e09626..84bb14b 100644 --- a/app/app/handler/unsubscribe_generator.py +++ b/app/app/handler/unsubscribe_generator.py @@ -35,7 +35,7 @@ class UnsubscribeGenerator: LOG.info("Email has no unsubscribe header") return message if isinstance(unsubscribe_data, Header): - unsubscribe_data = str(unsubscribe_data.encode) + unsubscribe_data = str(unsubscribe_data.encode()) raw_methods = [method.strip() for method in unsubscribe_data.split(",")] mailto_unsubs = None other_unsubs = []