fix import
This commit is contained in:
@@ -30,7 +30,7 @@ class Lead extends \Espo\Core\ORM\Repositories\RDB
|
||||
{
|
||||
parent::afterSave($entity, $options);
|
||||
|
||||
if ($entity->has('targetListId') && $entity->isNew()) {
|
||||
if ($entity->has('targetListId')) {
|
||||
$this->relate($entity, 'targetLists', $entity->get('targetListId'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -369,17 +369,18 @@ class Import extends \Espo\Services\Record
|
||||
if (array_key_exists('id', $whereClause)) {
|
||||
$entity->set('id', $whereClause['id']);
|
||||
}
|
||||
$entity->set('assignedUserId', $this->getUser()->id);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$entity = $this->getEntityManager()->getEntity($scope);
|
||||
$entity->set('assignedUserId', $this->getUser()->id);
|
||||
}
|
||||
|
||||
$isNew = $entity->isNew();
|
||||
|
||||
$entity->set('assignedUserId', $this->getUser()->id);
|
||||
|
||||
if (!empty($params['defaultValues'])) {
|
||||
$v = get_object_vars($params['defaultValues']);
|
||||
|
||||
Reference in New Issue
Block a user