Don't compact the publicKey

This commit is contained in:
Jeremy Dormitzer 2018-11-01 08:29:08 -04:00
parent d53eb2af9d
commit 813a16a37c

View File

@ -338,6 +338,9 @@ function compact_object( $object ) {
$object = \pterotype\util\dereference_object( $object );
$compacted = $object;
foreach( $object as $field => $value ) {
if ( $field === 'publicKey' ) {
continue;
}
if ( is_array( $value ) && array_key_exists( 'id', $value ) ) {
$child_object = compact_object( $value );
create_object_if_not_exists( $child_object );