mirror of
https://github.com/janeczku/calibre-web
synced 2025-10-21 18:47:39 +00:00
Fix bug with shelf deletions for Kobo.
We were incorrectly setting the user_id field in the ShelfArchive table
This commit is contained in:
@@ -283,7 +283,7 @@ def delete_shelf_helper(cur_shelf):
|
|||||||
shelf_id = cur_shelf.id
|
shelf_id = cur_shelf.id
|
||||||
ub.session.delete(cur_shelf)
|
ub.session.delete(cur_shelf)
|
||||||
ub.session.query(ub.BookShelf).filter(ub.BookShelf.shelf == shelf_id).delete()
|
ub.session.query(ub.BookShelf).filter(ub.BookShelf.shelf == shelf_id).delete()
|
||||||
ub.session.add(ub.ShelfArchive(uuid = cur_shelf.uuid, user_id = cur_shelf.uuid))
|
ub.session.add(ub.ShelfArchive(uuid = cur_shelf.uuid, user_id = cur_shelf.user_id))
|
||||||
ub.session.commit()
|
ub.session.commit()
|
||||||
log.info("successfully deleted %s", cur_shelf)
|
log.info("successfully deleted %s", cur_shelf)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user