mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
63b72a9b4f
commit
b6316952c2
@ -1254,7 +1254,7 @@ class LibraryDatabase2(LibraryDatabase, SchemaUpgrade, CustomColumns):
|
||||
'''
|
||||
Set metadata for the book `id` from the `Metadata` object `mi`
|
||||
'''
|
||||
if hasattr(mi, 'to_book_metadata'):
|
||||
if callable(getattr(mi, 'to_book_metadata', None)):
|
||||
# Handle code passing in a OPF object instead of a Metadata object
|
||||
mi = mi.to_book_metadata()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user