Browse Source

Fix wrong publisher id (#14212)

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: zeripath <art27@cantab.net>
tags/v1.15.0-dev
Lunny Xiao GitHub 4 years ago
parent
commit
a0309e04c8
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      services/release/release.go

+ 5
- 3
services/release/release.go View File

@@ -63,9 +63,11 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error {
return fmt.Errorf("CommitsCount: %v", err)
}

u, err := models.GetUserByEmail(commit.Author.Email)
if err == nil {
rel.PublisherID = u.ID
if rel.PublisherID <= 0 {
u, err := models.GetUserByEmail(commit.Author.Email)
if err == nil {
rel.PublisherID = u.ID
}
}

} else {


Loading…
Cancel
Save