diff --git a/invenio_communities/assets/semantic-ui/js/invenio_communities/settings/profile/CommunityProfileForm.js b/invenio_communities/assets/semantic-ui/js/invenio_communities/settings/profile/CommunityProfileForm.js index b41508978..8b8684345 100644 --- a/invenio_communities/assets/semantic-ui/js/invenio_communities/settings/profile/CommunityProfileForm.js +++ b/invenio_communities/assets/semantic-ui/js/invenio_communities/settings/profile/CommunityProfileForm.js @@ -470,6 +470,19 @@ class CommunityProfileForm extends Component { [] )} serializeSuggestions={(organizations) => { + // Add organizations to known organizations + organizations.forEach((organization) => { + // eslint-disable-next-line no-prototype-builtins + const isKnownOrg = this.knownOrganizations.hasOwnProperty( + organization.name + ); + if (!isKnownOrg) { + this.knownOrganizations = { + ...this.knownOrganizations, + [organization.name]: organization.id, + }; + } + }); return AffiliationsSuggestions(organizations, true); }} label={