Convert addresses to strings in diff_roster() for set operations

This commit is contained in:
Adam Goldsmith 2023-09-02 00:21:53 -04:00
parent defc42e3fb
commit 51439a54c2

View File

@ -68,7 +68,7 @@ def diff_roster(
expected_members_dict = dict(
list(reversed(email.utils.parseaddr(member))) for member in expected_members
)
existing_members_dict = {member.address: member for member in existing_members}
existing_members_dict = {str(member.address): member for member in existing_members}
members_to_add = {
k: expected_members_dict[k]
for k in set(expected_members_dict) - set(existing_members_dict)