From 964010839569b37e665fe6824e7f760c00c45548 Mon Sep 17 00:00:00 2001 From: Kostiantyn Stoliarskyi Date: Fri, 2 Jun 2023 09:14:21 +0300 Subject: [PATCH 1/2] fix sub_coll modal --- app/templates/book/modals/add_sub_collection_modal.html | 8 -------- 1 file changed, 8 deletions(-) diff --git a/app/templates/book/modals/add_sub_collection_modal.html b/app/templates/book/modals/add_sub_collection_modal.html index 37d366b..46199f9 100644 --- a/app/templates/book/modals/add_sub_collection_modal.html +++ b/app/templates/book/modals/add_sub_collection_modal.html @@ -23,14 +23,6 @@ -
-
-
- - -
-
-
From 9da0eea31ae6980fe13d96dff0015f68fd6c0b8c Mon Sep 17 00:00:00 2001 From: Kostiantyn Stoliarskyi Date: Fri, 2 Jun 2023 10:08:33 +0300 Subject: [PATCH 2/2] fix route on book stat --- app/views/book/book.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/app/views/book/book.py b/app/views/book/book.py index 0fe409b..e51a28a 100644 --- a/app/views/book/book.py +++ b/app/views/book/book.py @@ -1,9 +1,4 @@ -from flask import ( - render_template, - flash, - redirect, - url_for, -) +from flask import render_template, flash, redirect, url_for, request from flask_login import login_required, current_user from sqlalchemy import and_, or_ @@ -180,11 +175,12 @@ def delete(book_id: int): @bp.route("//statistics", methods=["GET"]) def statistic_view(book_id: int): book = db.session.get(m.Book, book_id) + active_tab = request.args.get("active_tab") if not book or book.is_deleted: log(log.WARNING, "Book with id [%s] not found", book_id) flash("Book not found", "danger") return redirect(url_for("book.my_library")) - return render_template("book/stat.html", book=book) + return render_template("book/stat.html", book=book, active_tab=active_tab) @bp.route("/favorite_books", methods=["GET"])