From 59a95a88f1ed9d855c848110867df8ae1c28b861 Mon Sep 17 00:00:00 2001 From: Javier Romero Castro Date: Wed, 4 Oct 2023 15:44:36 +0200 Subject: [PATCH] services: add id to query parser * closes https://github.com/zenodo/rdm-project/issues/262 --- invenio_users_resources/services/users/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invenio_users_resources/services/users/config.py b/invenio_users_resources/services/users/config.py index 2a5aafb..65db079 100644 --- a/invenio_users_resources/services/users/config.py +++ b/invenio_users_resources/services/users/config.py @@ -47,7 +47,7 @@ class UserSearchOptions(SearchOptions, SearchOptionsMixin): query_parser_cls = QueryParser.factory( tree_transformer_cls=SearchFieldTransformer, fields=["username^2", "email^2", "profile.full_name^3", "profile.affiliations"], - allow_list=["username", "email"], # mapped fields are added on the query parser + allow_list=["username", "email", "id"], # mapped fields are added on the query parser mapping={ "affiliation": "profile.affiliations", "affiliations": "profile.affiliations",