summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortechknowlogick <techknowlogick@gitea.io>2021-04-23 23:14:39 -0400
committerGitHub <noreply@github.com>2021-04-24 11:14:39 +0800
commitea40eb749b9f7f238fc9bb60c4a9d455c62b75ca (patch)
tree0b1d77fdbe33586d4b999a6a6b843bb8a49046ec
parent1b3dbdba4e218a9f2ca58f342a20c8beb53bb28a (diff)
downloadgitea-ea40eb749b9f7f238fc9bb60c4a9d455c62b75ca.tar.gz
gitea-ea40eb749b9f7f238fc9bb60c4a9d455c62b75ca.zip
Resolve panic on failed interface conversion in migration v156 (#15604)
go panics otherwise with `panic: interface conversion: error is git.ErrNotExist, not *git.ErrNotExist`, thanks to Codeberg/Andi for reporting this. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
-rw-r--r--models/migrations/v156.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/migrations/v156.go b/models/migrations/v156.go
index 9b63691a0f..1e7cf28277 100644
--- a/models/migrations/v156.go
+++ b/models/migrations/v156.go
@@ -119,7 +119,7 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error {
commit, err := gitRepo.GetTagCommit(release.TagName)
if err != nil {
if git.IsErrNotExist(err) {
- log.Warn("Unable to find commit %s for Tag: %s in %-v. Cannot update publisher ID.", err.(*git.ErrNotExist).ID, release.TagName, repo)
+ log.Warn("Unable to find commit %s for Tag: %s in %-v. Cannot update publisher ID.", err.(git.ErrNotExist).ID, release.TagName, repo)
continue
}
log.Error("Error whilst getting commit for Tag: %s in %-v.", release.TagName, repo)