From 9296d35517493ee928a29f04f903315e15fb43ef Mon Sep 17 00:00:00 2001 From: Michael Shavit Date: Tue, 21 Apr 2020 23:57:20 -0400 Subject: [PATCH] Fix bug with shelf deletions for Kobo. We were incorrectly setting the user_id field in the ShelfArchive table --- cps/shelf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cps/shelf.py b/cps/shelf.py index 7d79724e..2801b9b6 100644 --- a/cps/shelf.py +++ b/cps/shelf.py @@ -283,7 +283,7 @@ def delete_shelf_helper(cur_shelf): shelf_id = cur_shelf.id ub.session.delete(cur_shelf) 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() log.info("successfully deleted %s", cur_shelf)