mirror of
				https://github.com/invoiceninja/invoiceninja.git
				synced 2025-10-31 18:07:35 -04:00 
			
		
		
		
	Merge pull request #5783 from turbo124/v5-develop
Fixes for failed migration
This commit is contained in:
		
						commit
						23f0a8fdd4
					
				| @ -139,7 +139,7 @@ class StartMigration implements ShouldQueue | |||||||
|             $this->company->update_products = $update_product_flag; |             $this->company->update_products = $update_product_flag; | ||||||
|             $this->company->save(); |             $this->company->save(); | ||||||
| 
 | 
 | ||||||
|             Mail::to($this->user->email, $this->user->name())->send(new MigrationFailed($e, $e->getMessage())); |             Mail::to($this->user->email, $this->user->name())->send(new MigrationFailed($e, $e->getMessage(), $this->company->settings)); | ||||||
| 
 | 
 | ||||||
|             if (app()->environment() !== 'production') { |             if (app()->environment() !== 'production') { | ||||||
|                 info($e->getMessage()); |                 info($e->getMessage()); | ||||||
|  | |||||||
| @ -12,14 +12,14 @@ class MigrationFailed extends Mailable | |||||||
| 
 | 
 | ||||||
|     public $exception; |     public $exception; | ||||||
|     public $content; |     public $content; | ||||||
| 
 |     public $settings; | ||||||
|     /** |     /** | ||||||
|      * Create a new message instance. |      * Create a new message instance. | ||||||
|      * |      * | ||||||
|      * @param $content |      * @param $content | ||||||
|      * @param $exception |      * @param $exception | ||||||
|      */ |      */ | ||||||
|     public function __construct($exception, $content = null) |     public function __construct($exception, $content = null, $setings) | ||||||
|     { |     { | ||||||
|         $this->exception = $exception; |         $this->exception = $exception; | ||||||
|         $this->content = $content; |         $this->content = $content; | ||||||
| @ -33,6 +33,7 @@ class MigrationFailed extends Mailable | |||||||
|     public function build() |     public function build() | ||||||
|     { |     { | ||||||
|         return $this->from(config('mail.from.address'), config('mail.from.name')) |         return $this->from(config('mail.from.address'), config('mail.from.name')) | ||||||
|                     ->view('email.migration.failed'); |                     ->view('email.migration.failed',['settings' => $this->settings]) | ||||||
|  |                     ->with(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user