From 66824ff4e40729a039ad0657225d6a09afc6cd22 Mon Sep 17 00:00:00 2001 From: OzzieIsaacs Date: Sun, 2 Sep 2018 13:58:17 +0200 Subject: [PATCH] Fix #576 --- cps/web.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cps/web.py b/cps/web.py index 4b103abd..305d6aa9 100644 --- a/cps/web.py +++ b/cps/web.py @@ -3263,8 +3263,7 @@ def edit_book(book_id): except Exception: app.logger.warning(file.format.lower() + ' already removed from list.') - app.logger.debug('Allowed conversion formats:') - app.logger.debug(allowed_conversion_formats) + app.logger.debug('Allowed conversion formats: '+ ', '.join(allowed_conversion_formats)) # Show form if request.method != 'POST': @@ -3505,6 +3504,7 @@ def edit_book(book_id): if new_cc is None: new_cc = cc_class(value=to_save[cc_string].strip()) db.session.add(new_cc) + db.session.flush() new_cc = db.session.query(cc_class).filter( cc_class.value == to_save[cc_string].strip()).first() # add cc value to book