Update mass edit

Refactored delete User function
Updated testresults
This commit is contained in:
Ozzie Isaacs
2024-12-09 17:08:58 +01:00
parent 89e9958222
commit 08527ae3ce
10 changed files with 473 additions and 372 deletions

View File

@@ -56,7 +56,7 @@ def remove_synced_book(book_id, all=False, session=None):
def change_archived_books(book_id, state=None, message=None):
archived_book = ub.session.query(ub.ArchivedBook).filter(and_(ub.ArchivedBook.user_id == int(current_user.id),
ub.ArchivedBook.book_id == book_id)).first()
if not archived_book and (state == True or state == None):
if not archived_book: # and (state == True or state == None):
archived_book = ub.ArchivedBook(user_id=current_user.id, book_id=book_id)
archived_book.is_archived = state if state != None else not archived_book.is_archived