mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-08 15:13:41 +02:00
User reported an error which appears to mean the series_index is None. This works around this.
This commit is contained in:
parent
a27ed8168d
commit
30f5700629
1 changed files with 2 additions and 0 deletions
|
|
@ -2357,6 +2357,8 @@ def set_series(self, connection, book):
|
|||
update_query = 'UPDATE content SET Series=?, SeriesNumber==? where BookID is Null and ContentID = ?'
|
||||
if book.series is None:
|
||||
update_values = (None, None, book.contentID, )
|
||||
elif book.series_index is None: # This should never happen, but...
|
||||
update_values = (book.series, None, book.contentID, )
|
||||
else:
|
||||
update_values = (book.series, "%g"%book.series_index, book.contentID, )
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue