Skip to content

Commit

Permalink
bugfix: add schema to record
Browse files Browse the repository at this point in the history
append schema to new records distinguish between different schema versions
  • Loading branch information
philippgualdi committed Dec 20, 2023
1 parent 9cc2b08 commit db60b9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions invenio_records_marc21/records/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ class Marc21Draft(Draft):
versions_model_cls = models.VersionsState
parent_record_cls = Marc21Parent

schema = ConstantField("$schema", "local://marc21/marc21-v2.0.0.json")

index = IndexField(
"marc21records-drafts-marc21-v2.0.0", search_alias="marc21records-marc21"
)
Expand Down Expand Up @@ -123,6 +125,8 @@ class Marc21Record(Record):
versions_model_cls = models.VersionsState
parent_record_cls = Marc21Parent

schema = ConstantField("$schema", "local://marc21/marc21-v2.0.0.json")

index = IndexField(
"marc21records-marc21-marc21-v2.0.0", search_alias="marc21records-marc21"
)
Expand Down

0 comments on commit db60b9a

Please sign in to comment.