mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
fix panic in migrations (#27494)
This commit is contained in:
parent
8dcd839766
commit
1f9c9486b8
@ -598,7 +598,7 @@ func (s *Server) doCloudS3PathMigrations(c request.CTX) error {
|
||||
}
|
||||
|
||||
if _, appErr := s.Jobs.CreateJobOnce(c, model.JobTypeS3PathMigration, nil); appErr != nil {
|
||||
return fmt.Errorf("failed to start job for migrating s3 file paths: %w", err)
|
||||
return fmt.Errorf("failed to start job for migrating s3 file paths: %w", appErr)
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -619,7 +619,7 @@ func (s *Server) doDeleteEmptyDraftsMigration(c request.CTX) error {
|
||||
}
|
||||
|
||||
if _, appErr := s.Jobs.CreateJobOnce(c, model.JobTypeDeleteEmptyDraftsMigration, nil); appErr != nil {
|
||||
return fmt.Errorf("failed to start job for deleting empty drafts: %w", err)
|
||||
return fmt.Errorf("failed to start job for deleting empty drafts: %w", appErr)
|
||||
}
|
||||
|
||||
return nil
|
||||
@ -640,7 +640,7 @@ func (s *Server) doDeleteOrphanDraftsMigration(c request.CTX) error {
|
||||
}
|
||||
|
||||
if _, appErr := s.Jobs.CreateJobOnce(c, model.JobTypeDeleteOrphanDraftsMigration, nil); appErr != nil {
|
||||
return fmt.Errorf("failed to start job for deleting orphan drafts: %w", err)
|
||||
return fmt.Errorf("failed to start job for deleting orphan drafts: %w", appErr)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user