mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed import error.
This commit is contained in:
parent
921e2c06f4
commit
a4a723cfc6
@ -280,12 +280,14 @@ class CsvImporter implements ImporterInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($request->get('settings') == 'map') {
|
if ($request->get('settings') == 'map') {
|
||||||
foreach ($all['mapping'] as $index => $data) {
|
if (isset($all['mapping'])) {
|
||||||
$config['column-mapping-config'][$index] = [];
|
foreach ($all['mapping'] as $index => $data) {
|
||||||
foreach ($data as $value => $mapId) {
|
$config['column-mapping-config'][$index] = [];
|
||||||
$mapId = intval($mapId);
|
foreach ($data as $value => $mapId) {
|
||||||
if ($mapId !== 0) {
|
$mapId = intval($mapId);
|
||||||
$config['column-mapping-config'][$index][$value] = intval($mapId);
|
if ($mapId !== 0) {
|
||||||
|
$config['column-mapping-config'][$index][$value] = intval($mapId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -302,7 +304,16 @@ class CsvImporter implements ImporterInterface
|
|||||||
*/
|
*/
|
||||||
private function doColumnMapping(): bool
|
private function doColumnMapping(): bool
|
||||||
{
|
{
|
||||||
return $this->job->configuration['column-mapping-complete'] === false;
|
$mapArray = $this->job->configuration['column-do-mapping'] ?? [];
|
||||||
|
$doMap = false;
|
||||||
|
foreach ($mapArray as $value) {
|
||||||
|
if ($value === true) {
|
||||||
|
$doMap = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->job->configuration['column-mapping-complete'] === false && $doMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user