Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Fix error when not-existing import job is submitted.
James Coleb23eb0701869
diff --git a/app/Console/Commands/CreateImport.php b/app/Console/Commands/CreateImport.phpindex d9b51a3b6d..c42ca44a2b 100644--- a/app/Console/Commands/CreateImport.php+++ b/app/Console/Commands/CreateImport.php@@ -84,7 +84,7 @@ class CreateImport extends Command$job = $jobRepository->create($type);$this->line(sprintf('Created job "%s"...', $job->key));- Artisan::call('firefly:encrypt', ['file' => $file, 'key' => $job->key]);+ Artisan::call('firefly:encrypt-file', ['file' => $file, 'key' => $job->key]);$this->line('Stored import data...');$job->configuration = $configurationData;diff --git a/app/Console/Commands/Import.php b/app/Console/Commands/Import.phpindex c67f39000f..91ad4b1b29 100644--- a/app/Console/Commands/Import.php+++ b/app/Console/Commands/Import.php@@ -59,6 +59,9 @@ class Import extends CommandLog::debug('Start start-import command');$jobKey = $this->argument('key');$job = ImportJob::whereKey($jobKey)->first();+ if (is_null($job)) {+ $this->error(sprintf('No job found with key "%s"', $jobKey));+ }if (!$this->isValid($job)) {Log::error('Job is not valid for some reason. Exit.');