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}
|
||||
}
|
||||
|
||||
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
|
||||
go func() {
|
||||
h.queue <- &model.Request{
|
||||
User: owner,
|
||||
Host: httputil.GetURL(r),
|
||||
Repo: repo,
|
||||
Commit: c,
|
||||
|
|
Loading…
Reference in a new issue