EPUB3 metadata: Recognize a creator as an author even if his first role is not aut

This commit is contained in:
Kovid Goyal 2019-09-19 10:52:31 +05:30
parent d459097e3f
commit c60dbbda8f
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -432,7 +432,8 @@ def is_relators_role(props, q):
for role in props.get('role'): for role in props.get('role'):
if role: if role:
scheme_ns, scheme, role = role scheme_ns, scheme, role = role
return role.lower() == q and (scheme_ns is None or (scheme_ns, scheme) == (reserved_prefixes['marc'], 'relators')) if role.lower() == q and (scheme_ns is None or (scheme_ns, scheme) == (reserved_prefixes['marc'], 'relators')):
return True
return False return False