-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
global: enabled sort by verified #535
global: enabled sort by verified #535
Conversation
594d360
to
cccf47c
Compare
site/zenodo_rdm/redirector.py
Outdated
@@ -54,7 +54,9 @@ def communities_detail_view_function(): | |||
:return: url for the view 'invenio_app_rdm_communities.communities_detail' | |||
:rtype: str | |||
""" | |||
_id = request.view_args.get("id", request.view_args["community_id"]) | |||
_id = request.view_args.get("id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default value was analysed when it wasn't needed. This was throwing an exception when community_id
was not in view_args
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we know in which cases we end up with missing community_id while the code expected it? Does it make sense to identify why it happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, by having a closer look I found out that community_id
was never a view argument for any of the redirected routes (the pydoc was misleading).
The redirected routes that hit this view are the following:
"redirect_communities_about_legacy": {
"source": "/communities/about/<id>/",
"target": communities_detail_view_function,
},
"redirect_collections_about": {
"source": "/collection/user-<id>",
"target": communities_detail_view_function,
},
which means that id
is the only view argument.
I also updated the pydoc of the method for clarity
2f9526b
to
efbb27e
Compare
2cbd457
to
a7a5b18
Compare
a7a5b18
to
7c0277b
Compare
No description provided.