* Fix an error when edit an execution.

This commit is contained in:
tianshujie
2023-10-13 14:06:58 +08:00
parent d34d07b9bd
commit c4d072d24c
+1 -1
View File
@@ -296,7 +296,7 @@ class executionModel extends model
$oldExecution = $this->dao->findById($executionID)->from(TABLE_EXECUTION)->fetch();
/* Judgment of required items, such as execution code name. */
if($oldExecution->type != 'stage' and $postData->code == '' and isset($this->config->setCode) and $this->config->setCode == 1)
if($oldExecution->type != 'stage' && empty($postData->code) && isset($this->config->setCode) && $this->config->setCode == 1)
{
/* $this->config->setCode is the value get from database with system owner and common module. */
dao::$errors['code'] = sprintf($this->lang->error->notempty, $this->lang->execution->code);