Browse Source

webhook: fix push panic to organizational repository (#4206)

pull/4240/head
Unknwon 8 years ago
parent
commit
d43f5f17fd
No known key found for this signature in database
GPG Key ID: 25B575AE3213B2B3
  1. 2
      gogs.go
  2. 2
      models/webhook.go
  3. 2
      templates/.VERSION

2
gogs.go

@ -16,7 +16,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.10.1.0228" const APP_VER = "0.10.2.0228"
func init() { func init() {
setting.AppVer = APP_VER setting.AppVer = APP_VER

2
models/webhook.go

@ -305,7 +305,7 @@ func GetWebhooksByOrgID(orgID int64) (ws []*Webhook, err error) {
// getActiveWebhooksByOrgID returns all active webhooks for an organization. // getActiveWebhooksByOrgID returns all active webhooks for an organization.
func getActiveWebhooksByOrgID(e Engine, orgID int64) ([]*Webhook, error) { func getActiveWebhooksByOrgID(e Engine, orgID int64) ([]*Webhook, error) {
ws := make([]*Webhook, 3) ws := make([]*Webhook, 0, 3)
return ws, e.Where("org_id=?", orgID).And("is_active=?", true).Find(&ws) return ws, e.Where("org_id=?", orgID).And("is_active=?", true).Find(&ws)
} }

2
templates/.VERSION

@ -1 +1 @@
0.10.1.0228 0.10.2.0228
Loading…
Cancel
Save