Merge pull request #12106 from fernando-almeida/develop

Fix HTTP AssetTransformer to generate an empty object for missing custom fields
This commit is contained in:
snipe 2022-11-15 15:54:43 +00:00 committed by GitHub
commit ae259f36ae
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,7 +131,7 @@ class AssetsTransformer
$array['custom_fields'] = $fields_array; $array['custom_fields'] = $fields_array;
} }
} else { } else {
$array['custom_fields'] = []; $array['custom_fields'] = new stdClass; // HACK to force generation of empty object instead of empty list
} }
$permissions_array['available_actions'] = [ $permissions_array['available_actions'] = [