mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-02 12:17:22 -06:00
Fix error when not-existing import job is submitted.
This commit is contained in:
parent
2116486fe0
commit
b23eb07018
@ -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;
|
||||
|
@ -59,6 +59,9 @@ class Import extends Command
|
||||
Log::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.');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user