diff options
author | Unknwon <joe2010xtmf@163.com> | 2014-09-09 10:17:35 -0400 |
---|---|---|
committer | Unknwon <joe2010xtmf@163.com> | 2014-09-09 10:17:35 -0400 |
commit | 33659ed9a5d95f13a4b10c06ba1e7c12e23ad6f0 (patch) | |
tree | e238915c2c295b309e0649983d978eb0aa97fe73 | |
parent | e004ec08e94fa8f8e438784cb132195d0084e1ca (diff) | |
download | gitea-33659ed9a5d95f13a4b10c06ba1e7c12e23ad6f0.tar.gz gitea-33659ed9a5d95f13a4b10c06ba1e7c12e23ad6f0.zip |
Fix #452
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | models/webhook.go | 4 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
3 files changed, 4 insertions, 4 deletions
@@ -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()) diff --git a/models/webhook.go b/models/webhook.go index 6aac457b90..5c0e217975 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -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 } diff --git a/templates/.VERSION b/templates/.VERSION index ec831f109b..b539e339a4 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.0.0907 Beta
\ No newline at end of file +0.5.0.0909 Beta
\ No newline at end of file |