Skip to content
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

skip unknown orgs #1268

Merged
merged 2 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
Changes
=======

Version v17.7.1 (released 2024-12-13)

- schema: skip unknown fields when loading organizations

Version v17.7.0 (released 2024-12-13)

- service: allow passing custom expires_at
Expand Down
2 changes: 1 addition & 1 deletion invenio_communities/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
from .ext import InvenioCommunities
from .proxies import current_communities

__version__ = "17.7.0"
__version__ = "17.7.1"

__all__ = ("InvenioCommunities", "current_communities")
14 changes: 13 additions & 1 deletion invenio_communities/communities/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
BaseGhostSchema,
BaseRecordSchema,
)
from invenio_vocabularies.contrib.affiliations.schema import AffiliationRelationSchema
from invenio_vocabularies.contrib.affiliations.schema import (
AffiliationRelationSchema as BaseAffiliationRelationSchema,
)
from invenio_vocabularies.contrib.awards.schema import FundingRelationSchema
from invenio_vocabularies.services.schema import (
VocabularyRelationSchema as VocabularySchema,
Expand Down Expand Up @@ -132,6 +134,16 @@ class CommunityAccessSchema(Schema):
)


# TODO: Probably this should be the default behavior for all relations
class AffiliationRelationSchema(BaseAffiliationRelationSchema):
"""Relaxed affiliation relation schema."""

class Meta:
"""Meta attributes for the schema."""

unknown = EXCLUDE


class CommunityMetadataSchema(Schema):
"""Community metadata schema."""

Expand Down
Loading