diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-03-29 22:57:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 16:57:33 +0200 |
commit | 74731c3a5aea71c81e4ca75bde96154f3adf3cfa (patch) | |
tree | 64b01935ab9912de71318eac447721e41b200135 /routers/web/repo | |
parent | bd97736b9c7a16023bc9abf17be6157284f655b1 (diff) | |
download | gitea-74731c3a5aea71c81e4ca75bde96154f3adf3cfa.tar.gz gitea-74731c3a5aea71c81e4ca75bde96154f3adf3cfa.zip |
Move some issue methods as functions (#19255)
* Move some issue methods as functions
* Fix bug
Diffstat (limited to 'routers/web/repo')
-rw-r--r-- | routers/web/repo/issue.go | 2 | ||||
-rw-r--r-- | routers/web/repo/issue_label.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go index 5af91c8e5f..c50e773e99 100644 --- a/routers/web/repo/issue.go +++ b/routers/web/repo/issue.go @@ -2595,7 +2595,7 @@ func updateAttachments(item interface{}, files []string) error { if len(files) > 0 { switch content := item.(type) { case *models.Issue: - err = content.UpdateAttachments(files) + err = models.UpdateIssueAttachments(content.ID, files) case *models.Comment: err = content.UpdateAttachments(files) default: diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go index 289e870bb1..887bbc115f 100644 --- a/routers/web/repo/issue_label.go +++ b/routers/web/repo/issue_label.go @@ -191,7 +191,7 @@ func UpdateIssueLabel(ctx *context.Context) { // detach if any issues already have label, otherwise attach action = "attach" for _, issue := range issues { - if issue.HasLabel(label.ID) { + if models.HasIssueLabel(issue.ID, label.ID) { action = "detach" break } |