From 6ceaa546ae3ea4fd014d3478ca92ea6b45560974 Mon Sep 17 00:00:00 2001 From: Chris Josten Date: Fri, 13 Feb 2026 16:09:29 +0100 Subject: [PATCH] utils/attr_is_relation: add portfolio_type to relation set /api/v1/portfolios/portfolio/ev-group/ returned `group_name` and `group_identifier` as numbers instead of strings. Other endpoints, like /api/v1/instruments/instrument/ev-group/ return strings correctly. These numerical values were then shown in the UI, as showcased in https://github.com/finmars-platform/finmars-core/issues/149#issuecomment-3896996252. By marking `portfolio_type` as a relation, it now correctly shows the names when invoking this API endpoint. --- poms/common/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/poms/common/utils.py b/poms/common/utils.py index 200108471..6bf5fd2e9 100644 --- a/poms/common/utils.py +++ b/poms/common/utils.py @@ -885,6 +885,7 @@ def attr_is_relation(content_type_key: str, attribute_key: str) -> bool: "group", "pricing_policy", "portfolio", + "portfolio_type", "transaction_type", "transaction_currency", "settlement_currency",