Skip to content

Commit

Permalink
Fixing record inclusion - made the heuristics more tight (#256)
Browse files Browse the repository at this point in the history
Small fix - made better detection of a top-level record in case we are inside the top-level record
  • Loading branch information
mesemus authored Feb 28, 2024
1 parent c5b3740 commit ccbaa59
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion oarepo_model_builder/loaders/extend.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ def extract_extended_record(included_data, *, context, **kwargs):
and keep those in "other_properties" inside the context so that other processors
can add some of those selectively.
"""
if "record" in included_data:
if (
"record" in included_data
and "properties" in included_data["record"]
and "properties" not in included_data
):
extended_object = included_data["record"]
elif "properties" in included_data:
extended_object = included_data
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-model-builder
version = 4.0.77
version = 4.0.78
description = A utility library that generates OARepo required data model files from a JSON specification file
authors = Miroslav Bauer <[email protected]>, Miroslav Simek <[email protected]>
readme = README.md
Expand Down

0 comments on commit ccbaa59

Please sign in to comment.