ImportSource: allow an imported object with no...

...modifiers to remove existing ones
This commit is contained in:
Thomas Gelf 2020-01-09 14:14:34 +01:00
parent e59bbc1a4d
commit 668012ac64
1 changed files with 4 additions and 1 deletions

View File

@ -104,6 +104,10 @@ class ImportSource extends DbObjectWithSettings implements ExportInterface
$object = static::create([], $db); $object = static::create([], $db);
} }
if (! isset($properties['modifiers'])) {
$properties['modifiers'] = [];
}
$object->setProperties($properties); $object->setProperties($properties);
return $object; return $object;
@ -128,7 +132,6 @@ class ImportSource extends DbObjectWithSettings implements ExportInterface
$i++; $i++;
} }
if ($modified) { if ($modified) {
// TOOD: no newRowModifiers, directly store loaded ones if diff
$this->newRowModifiers = $modifiers; $this->newRowModifiers = $modifiers;
} }
} }