Skip to content

Commit

Permalink
members: only use common keys in user relationship
Browse files Browse the repository at this point in the history
* Limits the user fields send for indexing to avoid issues when
  extending the user profile or preferences. (closes
  invenio-app-rdm#2198)
  • Loading branch information
egabancho committed Apr 15, 2024
1 parent 593cd38 commit 3e26f5a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions invenio_communities/members/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,19 @@ class MemberMixin:
attrs=[
"email",
"username",
"profile",
"preferences",
"active",
"confirmed",
"verified_at",
],
# Explicitly list common keys from fields that can be customizable
keys=[
"profile.affiliations",
"profile.full_name",
"preferences.locale",
"preferences.timezone",
"preferences.visibility",
"preferences.email_visibility",
],
),
group=ModelRelation(
GroupAggregate,
Expand Down

0 comments on commit 3e26f5a

Please sign in to comment.