fix import

This commit is contained in:
yuri
2015-09-25 15:41:38 +03:00
parent 2e988fab6d
commit 38502431f0
2 changed files with 3 additions and 2 deletions
@@ -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'));
}
}
+2 -1
View File
@@ -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']);