Skip to content

Commit

Permalink
schema: skip unknown fields when loading organizations
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Dec 13, 2024
1 parent bf8c659 commit 97a5abc
Showing 1 changed file with 13 additions and 1 deletion.
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

0 comments on commit 97a5abc

Please sign in to comment.