From e44bb3555c89a976100a6f81fd5471df994678ae Mon Sep 17 00:00:00 2001 From: Matthias Veit Date: Fri, 13 Sep 2024 12:56:42 +0200 Subject: [PATCH] [core][fix] Fix model filter condition (#2189) --- fixcore/fixcore/web/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fixcore/fixcore/web/api.py b/fixcore/fixcore/web/api.py index 71606ffe68..37ec1d676a 100644 --- a/fixcore/fixcore/web/api.py +++ b/fixcore/fixcore/web/api.py @@ -973,7 +973,7 @@ async def get_model(self, request: Request, deps: TenantDependencies) -> StreamR md = md.filter_complex(lambda x: x.fqn in kinds, with_bases, with_property_kinds) if filter_names := request.query.get("filter"): parts = filter_names.split(",") - md = md.filter_complex(lambda x: any(x.fqn in p for p in parts), with_bases, with_property_kinds) + md = md.filter_complex(lambda x: any(p in x.fqn for p in parts), with_bases, with_property_kinds) if aggregate_roots_only: md = md.filter_complex(lambda x: x.aggregate_root, with_bases, with_property_kinds) md = md.flat_kinds(full_model) if request.query.get("flat", "false") == "true" else md