summaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/models/action.go b/models/action.go
index c39fdc397a..ccf161192e 100644
--- a/models/action.go
+++ b/models/action.go
@@ -18,7 +18,6 @@ import (
"code.gitea.io/gitea/modules/setting"
"code.gitea.io/gitea/modules/timeutil"
- "github.com/unknwon/com"
"xorm.io/builder"
)
@@ -266,7 +265,7 @@ func (a *Action) GetIssueInfos() []string {
// GetIssueTitle returns the title of first issue associated
// with the action.
func (a *Action) GetIssueTitle() string {
- index := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
+ index, _ := strconv.ParseInt(a.GetIssueInfos()[0], 10, 64)
issue, err := GetIssueByIndex(a.RepoID, index)
if err != nil {
log.Error("GetIssueByIndex: %v", err)
@@ -278,7 +277,7 @@ func (a *Action) GetIssueTitle() string {
// GetIssueContent returns the content of first issue associated with
// this action.
func (a *Action) GetIssueContent() string {
- index := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
+ index, _ := strconv.ParseInt(a.GetIssueInfos()[0], 10, 64)
issue, err := GetIssueByIndex(a.RepoID, index)
if err != nil {
log.Error("GetIssueByIndex: %v", err)