Merge branch 'master' into Develop
# Conflicts: # cps/templates/layout.html
This commit is contained in:
@@ -446,7 +446,7 @@ def toggle_read(book_id):
|
||||
new_cc = cc_class(value=1, book=book_id)
|
||||
calibre_db.session.add(new_cc)
|
||||
calibre_db.session.commit()
|
||||
except KeyError:
|
||||
except (KeyError, AttributeError):
|
||||
log.error(u"Custom Column No.%d is not exisiting in calibre database", config.config_read_column)
|
||||
except OperationalError as e:
|
||||
calibre_db.session.rollback()
|
||||
@@ -1252,7 +1252,7 @@ def render_read_books(page, are_read, as_xml=False, order=None, *args, **kwargs)
|
||||
db_filter,
|
||||
order,
|
||||
db.cc_classes[config.config_read_column])
|
||||
except KeyError:
|
||||
except (KeyError, AttributeError):
|
||||
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
|
||||
if not as_xml:
|
||||
flash(_("Custom Column No.%(column)d is not existing in calibre database",
|
||||
@@ -1482,7 +1482,7 @@ def login():
|
||||
log.info('Login failed for user "%s" IP-adress: %s', form['username'], ipAdress)
|
||||
flash(_(u"Wrong Username or Password"), category="error")
|
||||
|
||||
next_url = url_for('web.index')
|
||||
next_url = request.args.get('next', default=url_for("web.index"), type=str)
|
||||
return render_title_template('login.html',
|
||||
title=_(u"login"),
|
||||
next_url=next_url,
|
||||
@@ -1759,7 +1759,7 @@ def show_book(book_id):
|
||||
try:
|
||||
matching_have_read_book = getattr(entries, 'custom_column_' + str(config.config_read_column))
|
||||
have_read = len(matching_have_read_book) > 0 and matching_have_read_book[0].value
|
||||
except KeyError:
|
||||
except (KeyError, AttributeError):
|
||||
log.error("Custom Column No.%d is not existing in calibre database", config.config_read_column)
|
||||
have_read = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user