1
1
Fork 1
mirror of https://github.com/go-gitea/gitea.git synced 2024-06-02 00:46:12 +02:00

check release publisher exists (#14375)

fixes #14365
was silently fixed in the feature PR #12096 for v1.14
This commit is contained in:
Norwin 2021-01-18 13:14:27 +00:00 committed by GitHub
parent e846b712fc
commit 5ee09d3c81
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)