From 56da4d1a1771b4ecbe822bd8512f19454724164d Mon Sep 17 00:00:00 2001 From: Mirek Simek Date: Thu, 13 Jul 2023 09:04:53 +0200 Subject: [PATCH] Marshmallow graph (#199) * marshmallow graph fix - cyclic dependencies on self * version bump --- oarepo_model_builder/datatypes/components/marshmallow/graph.py | 2 +- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oarepo_model_builder/datatypes/components/marshmallow/graph.py b/oarepo_model_builder/datatypes/components/marshmallow/graph.py index 4f8095fa..f6478406 100644 --- a/oarepo_model_builder/datatypes/components/marshmallow/graph.py +++ b/oarepo_model_builder/datatypes/components/marshmallow/graph.py @@ -137,7 +137,7 @@ def set_package_dependencies(classes_by_package): if not fld.reference: continue referenced_package = package_name(fld.reference.reference) - if referenced_package in classes_by_package: + if referenced_package != p and referenced_package in classes_by_package: pd.add_dependency(referenced_package) to_process = list(package_dependencies) processed_dependencies = set() diff --git a/setup.cfg b/setup.cfg index bd58e88c..b77d07c3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = oarepo-model-builder -version = 4.0.24 +version = 4.0.25 description = A utility library that generates OARepo required data model files from a JSON specification file authors = Miroslav Bauer , Miroslav Simek readme = README.md