improvements

This commit is contained in:
Lunny Xiao 2025-06-21 09:37:27 -07:00
parent 60227c5cdd
commit fd17f057e5
No known key found for this signature in database
GPG Key ID: C3B7C91B632F738A
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import (
"code.gitea.io/gitea/models/migrations/v1_22"
"code.gitea.io/gitea/models/migrations/v1_23"
"code.gitea.io/gitea/models/migrations/v1_24"
"code.gitea.io/gitea/models/migrations/v1_25"
"code.gitea.io/gitea/models/migrations/v1_6"
"code.gitea.io/gitea/models/migrations/v1_7"
"code.gitea.io/gitea/models/migrations/v1_8"
@ -382,6 +383,10 @@ func prepareMigrationTasks() []*migration {
newMigration(318, "Add anonymous_access_mode for repo_unit", v1_24.AddRepoUnitAnonymousAccessMode),
newMigration(319, "Add ExclusiveOrder to Label table", v1_24.AddExclusiveOrderColumnToLabelTable),
newMigration(320, "Migrate two_factor_policy to login_source table", v1_24.MigrateSkipTwoFactor),
// Gitea 1.24.0-rc0 ends at migration ID number 320 (database version 321)
newMigration(321, "Add Index to action_task table", v1_25.AddReleaseNotification),
}
return preparedMigrations
}

View File

@ -98,7 +98,7 @@ func (r *Release) LoadPublisher(ctx context.Context) error {
return nil
}
var err error
r.Publisher, err = user_model.GetUserByID(ctx, r.PublisherID)
r.Publisher, err = user_model.GetPossibleUserByID(ctx, r.PublisherID)
if err != nil {
if user_model.IsErrUserNotExist(err) {
r.Publisher = user_model.NewGhostUser()