diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2020-01-12 17:36:21 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-12 17:36:21 +0800 |
commit | 5765212c6dbcaeb27779707af3ca57775e535bd9 (patch) | |
tree | d3cf5fcedf21486e3b26731ba93cebd8ee13532b /models/repo_indexer.go | |
parent | 65baacf2273f74876b3faed93f60641389a20d39 (diff) | |
download | gitea-5765212c6dbcaeb27779707af3ca57775e535bd9.tar.gz gitea-5765212c6dbcaeb27779707af3ca57775e535bd9.zip |
Add owner_name column for table repository for maintaince reason (#9717)
* Add owner_name column for table repository for maintaince reason
* refactor
* Fix tests
* fix test
* fix bug when fork repository
Co-authored-by: zeripath <art27@cantab.net>
Diffstat (limited to 'models/repo_indexer.go')
-rw-r--r-- | models/repo_indexer.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/models/repo_indexer.go b/models/repo_indexer.go index aee3c74b35..a9a516175d 100644 --- a/models/repo_indexer.go +++ b/models/repo_indexer.go @@ -62,13 +62,13 @@ func (repo *Repository) GetIndexerStatus() error { // UpdateIndexerStatus updates indexer status func (repo *Repository) UpdateIndexerStatus(sha string) error { if err := repo.GetIndexerStatus(); err != nil { - return fmt.Errorf("UpdateIndexerStatus: Unable to getIndexerStatus for repo: %s/%s Error: %v", repo.MustOwnerName(), repo.Name, err) + return fmt.Errorf("UpdateIndexerStatus: Unable to getIndexerStatus for repo: %s Error: %v", repo.FullName(), err) } if len(repo.IndexerStatus.CommitSha) == 0 { repo.IndexerStatus.CommitSha = sha _, err := x.Insert(repo.IndexerStatus) if err != nil { - return fmt.Errorf("UpdateIndexerStatus: Unable to insert repoIndexerStatus for repo: %s/%s Sha: %s Error: %v", repo.MustOwnerName(), repo.Name, sha, err) + return fmt.Errorf("UpdateIndexerStatus: Unable to insert repoIndexerStatus for repo: %s Sha: %s Error: %v", repo.FullName(), sha, err) } return nil } @@ -76,7 +76,7 @@ func (repo *Repository) UpdateIndexerStatus(sha string) error { _, err := x.ID(repo.IndexerStatus.ID).Cols("commit_sha"). Update(repo.IndexerStatus) if err != nil { - return fmt.Errorf("UpdateIndexerStatus: Unable to update repoIndexerStatus for repo: %s/%s Sha: %s Error: %v", repo.MustOwnerName(), repo.Name, sha, err) + return fmt.Errorf("UpdateIndexerStatus: Unable to update repoIndexerStatus for repo: %s Sha: %s Error: %v", repo.FullName(), sha, err) } return nil } |