Skip to content

Commit

Permalink
check release publisher exists (#14375)
Browse files Browse the repository at this point in the history
fixes #14365
was silently fixed in the feature PR #12096 for v1.14
  • Loading branch information
noerw authored Jan 18, 2021
1 parent e846b71 commit 5ee09d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion models/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ func (r *Release) loadAttributes(e Engine) error {
if r.Publisher == nil {
r.Publisher, err = getUserByID(e, r.PublisherID)
if err != nil {
return err
if IsErrUserNotExist(err) {
r.Publisher = NewGhostUser()
} else {
return err
}
}
}
return getReleaseAttachments(e, r)
Expand Down

0 comments on commit 5ee09d3

Please sign in to comment.