Ensure unicode objects are passed as author names when finding duplicates

This commit is contained in:
Kovid Goyal 2022-05-21 06:03:45 +05:30
parent 2726a1b161
commit 8fb8717af8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -65,7 +65,7 @@ def find_identical_books(mi, data):
author_map, aid_map, title_map, lang_map = data author_map, aid_map, title_map, lang_map = data
found_books = None found_books = None
for a in mi.authors: for a in mi.authors:
author_ids = author_map.get(icu_lower(a)) author_ids = author_map.get(icu_lower(str(a)))
if author_ids is None: if author_ids is None:
return set() return set()
books_by_author = {book_id for aid in author_ids for book_id in aid_map.get(aid, ())} books_by_author = {book_id for aid in author_ids for book_id in aid_map.get(aid, ())}