mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-20 14:28:46 +03:00
check release publisher exists (#14375)
fixes #14365 was silently fixed in the feature PR #12096 for v1.14
This commit is contained in:
@ -54,9 +54,13 @@ 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 {
|
||||||
|
if IsErrUserNotExist(err) {
|
||||||
|
r.Publisher = NewGhostUser()
|
||||||
|
} else {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return getReleaseAttachments(e, r)
|
return getReleaseAttachments(e, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user