Skip to content

Firefly III: a personal finances manager

Only fire post-processing specifix in the import routine. See issue #145

James Coled211555beb45
diff --git a/app/Helpers/Csv/Importer.php b/app/Helpers/Csv/Importer.php
index 2aa4274b26..8f139d8bc8 100644
--- a/app/Helpers/Csv/Importer.php
+++ b/app/Helpers/Csv/Importer.php
@@ -246,6 +246,8 @@ class Importer
Log::debug('Column #' . $index . ' (role: ' . $role . ') : converter ' . $class . ' stores its data into field ' . $field . ':');
+ // here would be the place where preprocessors would fire.
+
/** @var ConverterInterface $converter */
$converter = app('FireflyIII\Helpers\Csv\Converter\\' . $class);
$converter->setData($data); // the complete array so far.
@@ -294,10 +296,12 @@ class Importer
foreach ($this->getSpecifix() as $className) {
/** @var SpecifixInterface $specifix */
$specifix = app('FireflyIII\Helpers\Csv\Specifix\\' . $className);
- $specifix->setData($this->importData);
- $specifix->setRow($this->importRow);
- Log::debug('Now post-process specifix named ' . $className . ':');
- $this->importData = $specifix->fix();
+ if ($specifix->getProcessorType() == SpecifixInterface::POST_PROCESSOR) {
+ $specifix->setData($this->importData);
+ $specifix->setRow($this->importRow);
+ Log::debug('Now post-process specifix named ' . $className . ':');
+ $this->importData = $specifix->fix();
+ }
}