Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
areksolek committed Jun 12, 2023
1 parent 7075296 commit d33e126
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/com_vtiger_workflow/tasks/VTCreateEntityTask.php
Expand Up @@ -28,7 +28,7 @@ public function doTask($recordModel)
{
$recordId = $recordModel->getId();
$entityType = $this->entity_type;
if (!\App\Module::isModuleActive($entityType)) {
if (!\App\Module::isModuleActive($entityType) || (!empty($this->verifyIfExists) && ($relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $entityType, $this->relationId)) && (int) $relationListView->getRelatedEntriesCount() > 0)) {
return;
}
$fieldValueMapping = [];
Expand All @@ -47,9 +47,6 @@ public function doTask($recordModel)
$relationModel->addRelation($recordModel->getId(), $newRecordModel->getId());
}
} elseif ($this->mappingPanel && $entityType) {
if (!empty($this->verifyIfExists) && ($relationListView = Vtiger_RelationListView_Model::getInstance($recordModel, $entityType, $this->relationId)) && (int) $relationListView->getRelatedEntriesCount() > 0) {
return true;
}
$saveContinue = true;
$newRecordModel = Vtiger_Record_Model::getCleanInstance($entityType);
$newRecordModel->setRecordFieldValues($recordModel);
Expand Down

1 comment on commit d33e126

@ArniSamano
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like still creating related record

Please sign in to comment.