1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-12-25 17:40:31 +00:00

Prevent delete of everything if database wasn't really changed

This commit is contained in:
Ozzie Isaacs 2022-02-05 15:11:50 +01:00
parent e0bf829def
commit 7254ce6c81

View File

@ -1208,6 +1208,7 @@ def _db_configuration_update_helper():
return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'),
gdrive_error)
# if db changed -> delete shelfs, delete download books, delete read books, kobo sync...
if db_change:
ub.session.query(ub.Downloads).delete()
ub.session.query(ub.ArchivedBook).delete()
ub.session.query(ub.ReadBook).delete()