mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix authors_to_string error with NoneType objects
This commit is contained in:
parent
df88a9dfaa
commit
1556b1497a
@ -21,7 +21,10 @@ def string_to_authors(raw):
|
||||
return authors
|
||||
|
||||
def authors_to_string(authors):
|
||||
return ' & '.join([a.replace('&', '&&') for a in authors])
|
||||
if authors is not None:
|
||||
return ' & '.join([a.replace('&', '&&') for a in authors])
|
||||
else:
|
||||
return ''
|
||||
|
||||
def author_to_author_sort(author):
|
||||
tokens = author.split()
|
||||
|
Loading…
x
Reference in New Issue
Block a user