mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-28 05:47:43 +00:00
Fix #1992 handle invalid numbers of books seriesindex
This commit is contained in:
@@ -439,6 +439,9 @@ def edit_book_series_index(series_index, book):
|
||||
# Add default series_index to book
|
||||
modif_date = False
|
||||
series_index = series_index or '1'
|
||||
if not series_index.replace('.', '', 1).isdigit():
|
||||
flash(_("%(seriesindex)s is not a valid number, skipping", seriesindex=series_index), category="warning")
|
||||
return False
|
||||
if book.series_index != series_index:
|
||||
book.series_index = series_index
|
||||
modif_date = True
|
||||
|
||||
Reference in New Issue
Block a user