Commit 753a0a82 authored by OzzieIsaacs's avatar OzzieIsaacs

Fix for #66 advanced search

parent 7f033e9f
...@@ -489,8 +489,10 @@ def advanced_search(): ...@@ -489,8 +489,10 @@ def advanced_search():
q = db.session.query(db.Books) q = db.session.query(db.Books)
include_tag_inputs = request.args.getlist('include_tag') include_tag_inputs = request.args.getlist('include_tag')
exclude_tag_inputs = request.args.getlist('exclude_tag') exclude_tag_inputs = request.args.getlist('exclude_tag')
author_name = request.args.get("author_name").strip() author_name = request.args.get("author_name")
book_title = request.args.get("book_title").strip() book_title = request.args.get("book_title")
if author_name: author_name=author_name.strip()
if book_title : book_title=book_title.strip()
if include_tag_inputs or exclude_tag_inputs or author_name or book_title: if include_tag_inputs or exclude_tag_inputs or author_name or book_title:
searchterm = [] searchterm = []
searchterm.extend((author_name, book_title)) searchterm.extend((author_name, book_title))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment