Bugfix after merge

Bugfix generate Metadata backup
pull/2725/head
Ozzie Isaacs 1 year ago
parent 3cf778b591
commit 64e9b13311

@ -163,7 +163,7 @@ def queue_metadata_backup():
show_text = {}
log.warning("Queuing all books for metadata backup")
helper.set_all_metadata_dirty()
show_text['text'] = _('Success! Books queued for Metadata Backup')
show_text['text'] = _('Success! Books queued for Metadata Backup, please check Tasks for result')
return json.dumps(show_text)
@ -1995,7 +1995,7 @@ def _handle_edit_user(to_save, content, languages, translations, kobo_support):
else:
content.role &= ~constants.ROLE_ANONYMOUS
if to_save.get("password", ""):
content.password = generate_password_hash(helper.valid_password(to_save.get["password"]))
content.password = generate_password_hash(helper.valid_password(to_save.get("password", "")))
new_email = valid_email(to_save.get("email", content.email))
if not new_email:

@ -89,7 +89,6 @@ class TaskBackupMetadata(CalibreTask):
self.open_metadata(book, custom_columns)
else:
self.log.error("Book {} not found in database".format(backup.book))
# self._handleError("Book {} not found in database".format(backup.book))
i += 1
self.progress = (1.0 / count) * i
self._handleSuccess()
@ -230,9 +229,8 @@ class TaskBackupMetadata(CalibreTask):
try:
with open(book_metadata_filepath, 'wb') as f:
doc.write(f, xml_declaration=True, encoding='utf-8', pretty_print=True)
except Exception:
# ToDo: Folder not writeable error
pass
except Exception as ex:
raise Exception('Writing Metadata failed with error: {} '.format(ex))
@property
def name(self):

@ -1423,7 +1423,7 @@ def change_profile(kobo_support, local_oauth_check, oauth_status, translations,
try:
if current_user.role_passwd() or current_user.role_admin():
if to_save.get("password", "") != "":
current_user.password = generate_password_hash(to_save.get("password"))
current_user.password = generate_password_hash(valid_password(to_save.get("password")))
if to_save.get("kindle_mail", current_user.kindle_mail) != current_user.kindle_mail:
current_user.kindle_mail = valid_email(to_save.get("kindle_mail"))
new_email = valid_email(to_save.get("email", current_user.email))

@ -58,7 +58,7 @@ install_requires =
flask-wtf>=0.14.2,<1.2.0
chardet>=3.0.0,<4.1.0
advocate>=1.0.0,<1.1.0
Flask-Limiter>=2.3.0,<3.2.0
Flask-Limiter>=2.3.0,<3.3.0
[options.extras_require]

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save