summaryrefslogtreecommitdiffstats
path: root/models/issue.go
diff options
context:
space:
mode:
authorEthan Koenig <ethantkoenig@gmail.com>2017-02-11 12:11:07 -0500
committerKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-02-12 08:54:15 +0100
commit076f940f1ff7cc075240d30179a92bdf52c006e4 (patch)
treef70643e6075bcf547c1e24f4fd50e8fb43851a68 /models/issue.go
parentd76f34ef519f773ab66f2ba9f91c65a3aaf6537e (diff)
downloadgitea-076f940f1ff7cc075240d30179a92bdf52c006e4.tar.gz
gitea-076f940f1ff7cc075240d30179a92bdf52c006e4.zip
Fix logging bug
Error logged everytime an assignee was removed
Diffstat (limited to 'models/issue.go')
-rw-r--r--models/issue.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/models/issue.go b/models/issue.go
index c3f5de6429..30a6cf8a4c 100644
--- a/models/issue.go
+++ b/models/issue.go
@@ -775,14 +775,12 @@ func (issue *Issue) ChangeAssignee(doer *User, assigneeID int64) (err error) {
} else {
apiPullRequest.Action = api.HookIssueAssigned
}
- err = PrepareWebhooks(issue.Repo, HookEventPullRequest, apiPullRequest)
- }
- if err != nil {
- log.Error(4, "PrepareWebhooks [is_pull: %v, remove_assignee: %v]: %v", issue.IsPull, isRemoveAssignee, err)
- } else {
- go HookQueue.Add(issue.RepoID)
+ if err := PrepareWebhooks(issue.Repo, HookEventPullRequest, apiPullRequest); err != nil {
+ log.Error(4, "PrepareWebhooks [is_pull: %v, remove_assignee: %v]: %v", issue.IsPull, isRemoveAssignee, err)
+ return nil
+ }
}
-
+ go HookQueue.Add(issue.RepoID)
return nil
}