mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 13:44:06 -08:00
Fixes #11093 Return true/false for custom fields/fieldsets required in API
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
ab8dcdcc40
commit
e0102ddbf0
|
@ -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'),
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue