Sync: allow to set object_type on new objects

This commit is contained in:
Thomas Gelf 2015-12-16 19:16:00 +01:00
parent 47e31f023b
commit 5f5490e4a7
1 changed files with 4 additions and 1 deletions

View File

@ -345,7 +345,10 @@ class Sync
} else { } else {
// New object // New object
if ($rule->object_type !== 'datalistEntry') { if ($rule->object_type !== 'datalistEntry') {
$newProps['object_type'] = 'object'; if (! array_key_exists('object_type', $newProps) || $newProps['object_type'] === null) {
$newProps['object_type'] = 'object';
}
if (! array_key_exists('object_name', $newProps) || $newProps['object_name'] === null) { if (! array_key_exists('object_name', $newProps) || $newProps['object_name'] === null) {
$newProps['object_name'] = $key; $newProps['object_name'] = $key;
} }