From 761111f9edd70ebce25620b46be8c90971ef0a57 Mon Sep 17 00:00:00 2001 From: techknowlogick Date: Sun, 25 Apr 2021 11:58:42 -0400 Subject: [PATCH] Resolve panic on failed interface conversion in migration v156 (#15604) (#15610) 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 Co-authored-by: Lunny Xiao --- models/migrations/v156.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/migrations/v156.go b/models/migrations/v156.go index 9b63691a0..1e7cf2827 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)