From 033ffbb3ed9676258879b74c67d1bd94704da9f7 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Fri, 27 Aug 2021 17:37:28 +0800 Subject: [PATCH] * Fix bug when creating a repo without gitlabProject. --- module/repo/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/repo/model.php b/module/repo/model.php index b9609b7fe5..b6887955db 100644 --- a/module/repo/model.php +++ b/module/repo/model.php @@ -224,7 +224,7 @@ class repoModel extends model if($data->encrypt == 'base64') $data->password = base64_encode($data->password); $this->dao->insert(TABLE_REPO)->data($data, $skip = 'gitlabHost,gitlabToken,gitlabProject') ->batchCheck($this->config->repo->create->requiredFields, 'notempty') - ->checkIF($data->SCM == 'GitLab', 'gitlabProject', 'notempty') + ->checkIF($data->SCM == 'Gitlab', 'gitlabProject', 'notempty') ->checkIF($data->SCM == 'Subversion', $this->config->repo->svn->requiredFields, 'notempty') ->autoCheck() ->exec(); @@ -282,7 +282,7 @@ class repoModel extends model $this->dao->update(TABLE_REPO)->data($data, $skip = 'gitlabHost,gitlabToken,gitlabProject') ->batchCheck($this->config->repo->edit->requiredFields, 'notempty') ->checkIF($data->SCM == 'Subversion', $this->config->repo->svn->requiredFields, 'notempty') - ->checkIF($data->SCM == 'GitLab', 'extra', 'notempty') + ->checkIF($data->SCM == 'Gitlab', 'extra', 'notempty') ->autoCheck() ->where('id')->eq($id)->exec();