1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 21:22:58 +01:00

Merge pull request #5783 from turbo124/v5-develop

Fixes for failed migration
This commit is contained in:
David Bomba 2021-05-22 13:20:55 +10:00 committed by GitHub
commit 23f0a8fdd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -139,7 +139,7 @@ class StartMigration implements ShouldQueue
$this->company->update_products = $update_product_flag;
$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') {
info($e->getMessage());

View File

@ -12,14 +12,14 @@ class MigrationFailed extends Mailable
public $exception;
public $content;
public $settings;
/**
* Create a new message instance.
*
* @param $content
* @param $exception
*/
public function __construct($exception, $content = null)
public function __construct($exception, $content = null, $setings)
{
$this->exception = $exception;
$this->content = $content;
@ -33,6 +33,7 @@ class MigrationFailed extends Mailable
public function build()
{
return $this->from(config('mail.from.address'), config('mail.from.name'))
->view('email.migration.failed');
->view('email.migration.failed',['settings' => $this->settings])
->with();
}
}