diff options
Diffstat (limited to 'models/issues/issue.go')
-rw-r--r-- | models/issues/issue.go | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/models/issues/issue.go b/models/issues/issue.go index 364d53ba31..d0c5ad2bf8 100644 --- a/models/issues/issue.go +++ b/models/issues/issue.go @@ -222,8 +222,7 @@ func (issue *Issue) LoadPoster(ctx context.Context) (err error) { if !user_model.IsErrUserNotExist(err) { return fmt.Errorf("getUserByID.(poster) [%d]: %w", issue.PosterID, err) } - err = nil - return + return nil } } return err @@ -316,27 +315,27 @@ func (issue *Issue) LoadMilestone(ctx context.Context) (err error) { // LoadAttributes loads the attribute of this issue. func (issue *Issue) LoadAttributes(ctx context.Context) (err error) { if err = issue.LoadRepo(ctx); err != nil { - return + return err } if err = issue.LoadPoster(ctx); err != nil { - return + return err } if err = issue.LoadLabels(ctx); err != nil { - return + return err } if err = issue.LoadMilestone(ctx); err != nil { - return + return err } if err = issue.LoadProject(ctx); err != nil { - return + return err } if err = issue.LoadAssignees(ctx); err != nil { - return + return err } if err = issue.LoadPullRequest(ctx); err != nil && !IsErrPullRequestNotExist(err) { |