From c54e5c33f231a621d2e0e7dead9798b470b5a53d Mon Sep 17 00:00:00 2001 From: r-dev Date: Fri, 3 Apr 2026 13:24:20 +0200 Subject: [PATCH] fix(custom-fields) : include machineContextOnly in ModelType.serializeCustomFields The GET response for ModelType structure was missing machineContextOnly, so on page reload the flag was always read as false by the frontend. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/Entity/ModelType.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Entity/ModelType.php b/src/Entity/ModelType.php index ea89bc7..4a223bc 100644 --- a/src/Entity/ModelType.php +++ b/src/Entity/ModelType.php @@ -421,13 +421,14 @@ class ModelType $items = []; foreach ($fields as $cf) { $items[] = [ - 'id' => $cf->getId(), - 'name' => $cf->getName(), - 'type' => $cf->getType(), - 'required' => $cf->isRequired(), - 'options' => $cf->getOptions(), - 'defaultValue' => $cf->getDefaultValue(), - 'orderIndex' => $cf->getOrderIndex(), + 'id' => $cf->getId(), + 'name' => $cf->getName(), + 'type' => $cf->getType(), + 'required' => $cf->isRequired(), + 'options' => $cf->getOptions(), + 'defaultValue' => $cf->getDefaultValue(), + 'orderIndex' => $cf->getOrderIndex(), + 'machineContextOnly' => $cf->isMachineContextOnly(), ]; }