diff options
author | Unknwon <u@gogs.io> | 2017-02-28 10:28:48 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-02-28 10:28:48 -0500 |
commit | d43f5f17fd1e07230ade010116acabdc2dde27b6 (patch) | |
tree | 00beb8a27826b924a9efd247e04bf5a8d3e52fd9 /models | |
parent | 193cc3ba9a831e677ee45d8c1e5c4fd6f29236a3 (diff) |
webhook: fix push panic to organizational repository (#4206)
Diffstat (limited to 'models')
-rw-r--r-- | models/webhook.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/models/webhook.go b/models/webhook.go index 0f475df5..54179ef3 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -305,7 +305,7 @@ func GetWebhooksByOrgID(orgID int64) (ws []*Webhook, err error) { // getActiveWebhooksByOrgID returns all active webhooks for an organization. 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) } |