Skip to content

Commit

Permalink
check on metadata availability
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Krist committed Sep 17, 2024
1 parent e1c3657 commit 9b75668
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
def add_version_to_metadata(model, **kwargs):
schema = model.schema["record"]["properties"]
schema.setdefault("metadata", {}).setdefault("properties", {}).setdefault("version", {"type": "keyword"})
if "metadata" not in schema:
return
schema["metadata"].setdefault("properties", {}).setdefault("version", {"type": "keyword"})
1 change: 1 addition & 0 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ if test -d ./build-tests/$MODEL; then
rm -rf ./build-tests/$MODEL
fi

editable_install /home/ron/prace/oarepo-model-builder-new
oarepo-compile-model ./build-tests/$MODEL.yaml --output-directory ./build-tests/$MODEL -vvv
if test -d $VENV ; then
rm -rf $VENV
Expand Down

0 comments on commit 9b75668

Please sign in to comment.