]> source.dussan.org Git - gitea.git/commitdiff
Fix #452
authorUnknwon <joe2010xtmf@163.com>
Tue, 9 Sep 2014 14:17:35 +0000 (10:17 -0400)
committerUnknwon <joe2010xtmf@163.com>
Tue, 9 Sep 2014 14:17:35 +0000 (10:17 -0400)
gogs.go
models/webhook.go
templates/.VERSION

diff --git a/gogs.go b/gogs.go
index 2ca0f9ad87f8d1959ea85a982ffade1d8685cf86..02ae7fd2874c937553c266c07d64a6db5701cef1 100644 (file)
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
        "github.com/gogits/gogs/modules/setting"
 )
 
-const APP_VER = "0.5.0.0907 Beta"
+const APP_VER = "0.5.0.0909 Beta"
 
 func init() {
        runtime.GOMAXPROCS(runtime.NumCPU())
index 6aac457b90c1ad1e54f87954c2cc58a4d8f1ee10..5c0e217975438e77cb95854fbc10a95823302e49 100644 (file)
@@ -99,7 +99,7 @@ func GetWebhookById(hookId int64) (*Webhook, error) {
 
 // GetActiveWebhooksByRepoId returns all active webhooks of repository.
 func GetActiveWebhooksByRepoId(repoId int64) (ws []*Webhook, err error) {
-       err = x.Find(&ws, &Webhook{RepoId: repoId, IsActive: true})
+       err = x.Where("repo_id=?", repoId).And("is_active=?", true).Find(&ws)
        return ws, err
 }
 
@@ -129,7 +129,7 @@ func GetWebhooksByOrgId(orgId int64) (ws []*Webhook, err error) {
 
 // GetActiveWebhooksByOrgId returns all active webhooks for an organization.
 func GetActiveWebhooksByOrgId(orgId int64) (ws []*Webhook, err error) {
-       err = x.Find(&ws, &Webhook{OrgId: orgId, IsActive: true})
+       err = x.Where("org_id=?", orgId).And("is_active=?", true).Find(&ws)
        return ws, err
 }
 
index ec831f109b44392d3e72a00786149ad454356b97..b539e339a432b3037edf02da6b62a105a1910c9b 100644 (file)
@@ -1 +1 @@
-0.5.0.0907 Beta
\ No newline at end of file
+0.5.0.0909 Beta
\ No newline at end of file