diff --git a/pkg/models/webhooks.go b/pkg/models/webhooks.go index cc8884d437b..b40c94d6a1e 100644 --- a/pkg/models/webhooks.go +++ b/pkg/models/webhooks.go @@ -116,6 +116,11 @@ func (w *Webhook) Create(s *xorm.Session, a web.Auth) (err error) { // TODO: check valid webhook events w.CreatedByID = a.GetID() _, err = s.Insert(w) + if err != nil { + return err + } + + w.CreatedBy, err = user.GetUserByID(s, a.GetID()) return }