diff --git a/invenio.cfg b/invenio.cfg index f381eeb..9624785 100644 --- a/invenio.cfg +++ b/invenio.cfg @@ -561,7 +561,7 @@ def blogs_search_view_function(): The following routes are redirected as follows: - /blogs -> GET /communities/search?q=&f=&p= - :return: url for the view 'invenio_app_rdm_communities.communities_search' + :return: url for the view 'invenio_communities.communities_search' :rtype: str """ _q = request.args.get("query", "") @@ -572,7 +572,7 @@ def blogs_search_view_function(): _f = f"subject:{category}" _p = request.args.get("page", 1) values = {"q": _q, "f": _f, "p": _p} - target = url_for("invenio_app_rdm_communities.communities_search", **values) + target = url_for("invenio_communities.communities_search", **values) return target def posts_detail_view_function(): @@ -601,13 +601,14 @@ def posts_search_view_function(): :rtype: str """ _q = request.args.get("query", "") - tags = request.args.get("tags", None) category = request.args.get("category", None) - if tags: - _f = f"subject:{tags}" - elif category: + tags = request.args.get("tags", None) + _f = "" + if category: category = camelcase_to_titlecase(category) _f = f"subject:{category}" + if tags: + _f = f"subject:{tags}" _p = request.args.get("page", 1) values = {"q": _q, "f": _f, "p": _p} target = url_for("invenio_search_ui.search", **values)