Prevent delete of everything if database wasn't really changed
This commit is contained in:
commit
6ca08a7cc1
|
@ -1228,6 +1228,7 @@ def _db_configuration_update_helper():
|
||||||
return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'),
|
return _db_configuration_result(_('DB Location is not Valid, Please Enter Correct Path'),
|
||||||
gdrive_error)
|
gdrive_error)
|
||||||
# if db changed -> delete shelfs, delete download books, delete read books, kobo sync...
|
# 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.Downloads).delete()
|
||||||
ub.session.query(ub.ArchivedBook).delete()
|
ub.session.query(ub.ArchivedBook).delete()
|
||||||
ub.session.query(ub.ReadBook).delete()
|
ub.session.query(ub.ReadBook).delete()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user