Skip to content

Commit

Permalink
fix panic in migrations (#27494)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCookie95 authored Jul 2, 2024
1 parent 8dcd839 commit 1f9c948
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/channels/app/migrations.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 1f9c948

Please sign in to comment.