Fixes #11093 Return true/false for custom fields/fieldsets required in API

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-06-06 20:03:20 -07:00
parent ab8dcdcc40
commit e0102ddbf0

View file

@ -46,7 +46,7 @@ class CustomFieldsTransformer
'field_values' => ($field->field_values) ? e($field->field_values) : null,
'field_values_array' => ($field->field_values) ? explode("\r\n", e($field->field_values)) : null,
'type' => e($field->element),
'required' => $field->pivot ? $field->pivot->required : false,
'required' => (($field->pivot) && ($field->pivot->required=='1')) ? true : false,
'created_at' => Helper::getFormattedDateObject($field->created_at, 'datetime'),
'updated_at' => Helper::getFormattedDateObject($field->updated_at, 'datetime'),
];