summaryrefslogtreecommitdiffstats
path: root/models/action.go
diff options
context:
space:
mode:
authorAlexey Makhov <amakhov@avito.ru>2015-11-13 00:01:51 +0300
committerAlexey Makhov <amakhov@avito.ru>2015-11-13 00:01:51 +0300
commit1bfebdcdf636c53fd5bc5ae89d8e3c9d4665bf93 (patch)
treeb2801997029a912e80de9a5ebdf843a099f7b1c0 /models/action.go
parent588a0db21869828c4ba1006855ed6454ca878068 (diff)
downloadgitea-1bfebdcdf636c53fd5bc5ae89d8e3c9d4665bf93.tar.gz
gitea-1bfebdcdf636c53fd5bc5ae89d8e3c9d4665bf93.zip
#1854 improves
Diffstat (limited to 'models/action.go')
-rw-r--r--models/action.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/action.go b/models/action.go
index 11a2de0339..106f2c2eb5 100644
--- a/models/action.go
+++ b/models/action.go
@@ -10,12 +10,12 @@ import (
"fmt"
"path"
"regexp"
- "strconv"
"strings"
"time"
"unicode"
"github.com/go-xorm/xorm"
+ "github.com/Unknwon/com"
api "github.com/gogits/go-gogs-client"
@@ -138,8 +138,8 @@ func (a Action) GetIssueInfos() []string {
}
func (a Action) GetIssueTitle() string {
- issueID, _ := strconv.Atoi(strings.SplitN(a.Content, "|", 2)[0])
- issue, _ := GetIssueByID(int64(issueID))
+ issueID := com.StrTo(a.GetIssueInfos()[0]).MustInt64()
+ issue, _ := GetIssueByID(issueID)
return issue.Name
}