This commit is contained in:
Yuri Kuznetsov
2021-04-20 13:08:56 +03:00
parent c4ae2c5c1b
commit eae701012a
@@ -253,7 +253,10 @@ class Database extends RDBRepository
if (!empty($options['createdById'])) {
$entity->set('createdById', $options['createdById']);
}
else if (empty($options['skipCreatedBy']) && (empty($options['import']) || !$entity->has('createdById'))) {
else if (
empty($options['skipCreatedBy']) &&
(empty($options['import']) || !$entity->has('createdById'))
) {
if ($this->applicationState->hasUser()) {
$entity->set('createdById', $this->applicationState->getUser()->id);
}