mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Email error if import fails
This commit is contained in:
parent
2542b1a640
commit
2fb227714a
@ -67,6 +67,7 @@ class ImportData extends Job implements ShouldQueue
|
||||
$this->user->account->loadLocalizationSettings();
|
||||
}
|
||||
|
||||
try {
|
||||
if ($this->type === IMPORT_JSON) {
|
||||
$includeData = $this->settings['include_data'];
|
||||
$includeSettings = $this->settings['include_settings'];
|
||||
@ -85,6 +86,11 @@ class ImportData extends Job implements ShouldQueue
|
||||
|
||||
$subject = trans('texts.import_complete');
|
||||
$message = $importService->presentResults($results, $includeSettings);
|
||||
} catch (Exception $exception) {
|
||||
$subject = trans('texts.import_failed');
|
||||
$message = $exception->getMessage();
|
||||
}
|
||||
|
||||
$userMailer->sendMessage($this->user, $subject, $message);
|
||||
|
||||
if (App::runningInConsole()) {
|
||||
|
@ -43,7 +43,7 @@ class HandleUserLoggedIn
|
||||
{
|
||||
$account = Auth::user()->account;
|
||||
|
||||
if (empty($account->last_login)) {
|
||||
if (! Utils::isNinja() && empty($account->last_login)) {
|
||||
event(new UserSignedUp());
|
||||
}
|
||||
|
||||
|
@ -2289,7 +2289,7 @@ $LANG = array(
|
||||
'deleted_recurring_expense' => 'Successfully deleted :count projects',
|
||||
'view_recurring_expense' => 'View Recurring Expense',
|
||||
'other' => 'Other',
|
||||
|
||||
'import_failed' => 'Import Failed',
|
||||
|
||||
);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user