diff options
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r-- | python/fatcat_web/routes.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index 7f10ee2b..115c1981 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -353,18 +353,12 @@ def changelog_entry_view(index): @app.route('/release/search', methods=['GET', 'POST']) def release_search(): - limit = 20 query = request.args.get('q') fulltext_only = bool(request.args.get('fulltext_only')) - # Convert raw DOIs to DOI queries - if query is not None: - if len(query.split()) == 1 and query.startswith("10.") and query.count("/") >= 1: - query = 'doi:"{}"'.format(query) - if 'q' in request.args.keys(): # always do files for HTML - found = do_release_search(query, limit=limit, fulltext_only=fulltext_only) + found = do_release_search(query, fulltext_only=fulltext_only) return render_template('release_search.html', found=found, query=query, fulltext_only=fulltext_only) else: return render_template('release_search.html', query=query, fulltext_only=fulltext_only) @@ -372,17 +366,11 @@ def release_search(): @app.route('/container/search', methods=['GET', 'POST']) def container_search(): - limit = 20 query = request.args.get('q') - # Convert raw ISSN-L to ISSN-L query - if query is not None: - if len(query.split()) == 1 and len(query) == 9 and isdigit(query[0:4]) and query[4] == '-': - query = 'issnl:"{}"'.format(query) - if 'q' in request.args.keys(): # always do files for HTML - found = do_container_search(query, limit=limit) + found = do_container_search(query) return render_template('container_search.html', found=found, query=query) else: return render_template('container_search.html', query=query) |