diff options
Diffstat (limited to 'python/fatcat_web/routes.py')
-rw-r--r-- | python/fatcat_web/routes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/fatcat_web/routes.py b/python/fatcat_web/routes.py index f229a572..1f6602d4 100644 --- a/python/fatcat_web/routes.py +++ b/python/fatcat_web/routes.py @@ -364,7 +364,7 @@ def container_view_browse(ident: str) -> AnyResponse: query_sort: Optional[List[str]] if request.args.get("year") and "volume" in request.args and "issue" in request.args: # year, volume, issue specified; browse-by-page - year = int(request.args.get("year")) + year = int(request.args["year"]) volume = request.args.get("volume", "") issue = request.args.get("issue", "") if volume: @@ -379,7 +379,7 @@ def container_view_browse(ident: str) -> AnyResponse: query_sort = ["first_page", "pages", "release_date"] elif request.args.get("year") and "volume" in request.args: # year, volume specified (no issue); browse-by-page - year = int(request.args.get("year")) + year = int(request.args["year"]) volume = request.args.get("volume", "") if volume: volume = f'volume:"{volume}"' @@ -389,7 +389,7 @@ def container_view_browse(ident: str) -> AnyResponse: query_sort = ["issue", "first_page", "pages", "release_date"] elif request.args.get("year"): # year specified, not anything else; browse-by-date - year = int(request.args.get("year")) + year = int(request.args["year"]) query_string = f"year:{year}" query_sort = ["release_date"] elif request.args.get("volume"): |