fix BUG-19 - unrated books, used wrong table joins

This commit is contained in:
2022-07-06 22:38:09 +10:00
parent 32e0edc46c
commit e6ce558665
2 changed files with 1 additions and 2 deletions

1
BUGs
View File

@@ -13,4 +13,3 @@ BUG-6: author,series, etc. do not have explicit ordering like sub-books... sort
- add/remove authors, and after save they are ordered by author.id, not order of addition (prob. needs book_author_link to have an auth_num)
#### SHOWSTOPPER:
BUG-19: show unrated gets all books, looks like ORM is not joining as I expected -- I wonder if it relates to that SAWarning about book id being written in the wrong spot?

View File

@@ -774,7 +774,7 @@ def books_on_shelf():
@app.route("/unrated_books", methods=["GET"])
@login_required
def unrated_books():
books = Book.query.join(Condition,Owned).filter(Rating.name=='Undefined',Owned.name=='Currently Owned').all()
books = Book.query.join(Rating,Owned).filter(Rating.name=='Undefined',Owned.name=='Currently Owned').all()
return render_template("books.html", books=books, page_title="Books with no rating", show_cols='Rating', hide_cols='' )
def FindMissingBooks():