From d43f5f17fd1e07230ade010116acabdc2dde27b6 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Tue, 28 Feb 2017 10:28:48 -0500 Subject: webhook: fix push panic to organizational repository (#4206) --- models/webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'models') 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) } -- cgit v1.2.3