Add fix and migration
This commit is contained in:
parent
613e5387c5
commit
a610e93cc9
2 changed files with 5 additions and 0 deletions
|
@ -58,6 +58,8 @@ var migrations = []*Migration{
|
|||
NewMigration("Add the `apply_to_admins` column to the `protected_branch` table", forgejo_v1_22.AddApplyToAdminsSetting),
|
||||
// v9 -> v10
|
||||
NewMigration("Add pronouns to user", forgejo_v1_22.AddPronounsToUser),
|
||||
// v11 -> v12
|
||||
NewMigration("Add repo_archive_download_count table", forgejo_v1_22.AddRepoArchiveDownloadCount),
|
||||
}
|
||||
|
||||
// GetCurrentDBVersion returns the current Forgejo database version.
|
||||
|
|
|
@ -74,6 +74,9 @@ func GetArchiveDownloadCount(ctx context.Context, repoID, releaseID int64) (*api
|
|||
func GetArchiveDownloadCountForTagName(ctx context.Context, repoID int64, tagName string) (*api.TagArchiveDownloadCount, error) {
|
||||
release, err := GetRelease(ctx, repoID, tagName)
|
||||
if err != nil {
|
||||
if IsErrReleaseNotExist(err) {
|
||||
return new(api.TagArchiveDownloadCount), nil
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue