mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-19 16:31:01 +00:00
fixed panic due to missing user on rebuild
This commit is contained in:
parent
2593aeca27
commit
52422a3116
1 changed files with 6 additions and 0 deletions
|
@ -157,10 +157,16 @@ func (h *CommitHandler) PostCommit(w http.ResponseWriter, r *http.Request) error
|
||||||
return internalServerError{err}
|
return internalServerError{err}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
owner, err := h.users.Find(repo.UserID)
|
||||||
|
if err != nil {
|
||||||
|
return badRequest{err}
|
||||||
|
}
|
||||||
|
|
||||||
// drop the items on the queue
|
// drop the items on the queue
|
||||||
// drop the items on the queue
|
// drop the items on the queue
|
||||||
go func() {
|
go func() {
|
||||||
h.queue <- &model.Request{
|
h.queue <- &model.Request{
|
||||||
|
User: owner,
|
||||||
Host: httputil.GetURL(r),
|
Host: httputil.GetURL(r),
|
||||||
Repo: repo,
|
Repo: repo,
|
||||||
Commit: c,
|
Commit: c,
|
||||||
|
|
Loading…
Reference in a new issue