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) <noreply@anthropic.com>
This commit is contained in:
2026-04-03 13:24:20 +02:00
parent 51b491097e
commit c54e5c33f2

View File

@@ -421,13 +421,14 @@ class ModelType
$items = []; $items = [];
foreach ($fields as $cf) { foreach ($fields as $cf) {
$items[] = [ $items[] = [
'id' => $cf->getId(), 'id' => $cf->getId(),
'name' => $cf->getName(), 'name' => $cf->getName(),
'type' => $cf->getType(), 'type' => $cf->getType(),
'required' => $cf->isRequired(), 'required' => $cf->isRequired(),
'options' => $cf->getOptions(), 'options' => $cf->getOptions(),
'defaultValue' => $cf->getDefaultValue(), 'defaultValue' => $cf->getDefaultValue(),
'orderIndex' => $cf->getOrderIndex(), 'orderIndex' => $cf->getOrderIndex(),
'machineContextOnly' => $cf->isMachineContextOnly(),
]; ];
} }