Skip to content

Firefly III: a personal finances manager

Fix import problem in 4.7.1

James Coled5aeca622238
diff --git a/app/Import/Object/ImportAccount.php b/app/Import/Object/ImportAccount.php
index 3d409992ae..990d17d495 100644
--- a/app/Import/Object/ImportAccount.php
+++ b/app/Import/Object/ImportAccount.php
@@ -382,11 +382,12 @@ class ImportAccount
Log::debug(sprintf('Found no account of type %s so must create one ourselves.', $this->expectedType));
$data = [
- 'accountType' => config('firefly.shortNamesByFullName.' . $this->expectedType),
- 'name' => $this->accountName['value'] ?? '(no name)',
- 'iban' => $this->accountIban['value'] ?? null,
- 'active' => true,
- 'virtualBalance' => '0',
+ 'accountType' => config('firefly.shortNamesByFullName.' . $this->expectedType),
+ 'name' => $this->accountName['value'] ?? '(no name)',
+ 'iban' => $this->accountIban['value'] ?? null,
+ 'active' => true,
+ 'virtualBalance' => '0',
+ 'account_type_id' => null,
];
$this->account = $this->repository->store($data);
diff --git a/app/Import/Storage/ImportStorage.php b/app/Import/Storage/ImportStorage.php
index 728cce920e..87e0c45c76 100644
--- a/app/Import/Storage/ImportStorage.php
+++ b/app/Import/Storage/ImportStorage.php
@@ -57,11 +57,11 @@ class ImportStorage
/** @var Collection */
public $journals;
/** @var BillRepositoryInterface */
- protected $billRepository; // yes, hard coded
+ protected $billRepository;
/** @var Collection */
protected $bills;
/** @var int */
- protected $defaultCurrencyId = 1;
+ protected $defaultCurrencyId = 1; // yes, hard coded
/** @var ImportJob */
protected $job;
/** @var ImportJobRepositoryInterface */
diff --git a/composer.json b/composer.json
index 2048e28814..22ebfe5fc2 100644
--- a/composer.json
+++ b/composer.json
@@ -113,11 +113,13 @@
"php artisan firefly:upgrade-database",
"php artisan firefly:verify",
"php artisan firefly:instructions update",
- "php artisan optimize"
+ "php artisan optimize",
+ "php artisan passport:install"
],
"post-install-cmd": [
"php artisan optimize",
- "php artisan firefly:instructions install"
+ "php artisan firefly:instructions install",
+ "php artisan passport:install"
]
},
"config": {