check release publisher exists (#14375)
fixes #14365 was silently fixed in the feature PR #12096 for v1.14
This commit is contained in:
parent
e846b712fc
commit
5ee09d3c81
1 changed files with 5 additions and 1 deletions
|
@ -54,7 +54,11 @@ func (r *Release) loadAttributes(e Engine) error {
|
||||||
if r.Publisher == nil {
|
if r.Publisher == nil {
|
||||||
r.Publisher, err = getUserByID(e, r.PublisherID)
|
r.Publisher, err = getUserByID(e, r.PublisherID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
if IsErrUserNotExist(err) {
|
||||||
|
r.Publisher = NewGhostUser()
|
||||||
|
} else {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return getReleaseAttachments(e, r)
|
return getReleaseAttachments(e, r)
|
||||||
|
|
Reference in a new issue