From 30f57006292acfe80817348ffc3ad49362459619 Mon Sep 17 00:00:00 2001 From: davidfor Date: Wed, 5 Dec 2012 22:25:35 +1100 Subject: [PATCH] User reported an error which appears to mean the series_index is None. This works around this. --- src/calibre/devices/kobo/driver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/calibre/devices/kobo/driver.py b/src/calibre/devices/kobo/driver.py index 60672d7167..0aa946c848 100644 --- a/src/calibre/devices/kobo/driver.py +++ b/src/calibre/devices/kobo/driver.py @@ -2357,6 +2357,8 @@ class KOBOTOUCH(KOBO): 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, )