Updated the migration routine, started on data tables.

This commit is contained in:
James Cole
2014-09-21 08:25:30 +02:00
parent 6a26408552
commit ba4bddf756
36 changed files with 937 additions and 305 deletions

View File

@@ -336,7 +336,7 @@ class Import
$accountID = intval($payload['data']['value']);
/*
* Is account imported already.
* Is account imported already?
*/
$importEntry = $this->_repository->findImportEntry($importMap, 'Account', $accountID);
@@ -349,11 +349,13 @@ class Import
/*
* Update all piggy banks.
*/
\Log::debug('Updating all piggybanks, found the right setting.');
foreach ($all as $piggy) {
$piggy->account()->associate($account);
unset($piggy->leftInAccount);
$piggy->save();
if (!is_null($account)) {
\Log::debug('Updating all piggybanks, found the right setting.');
foreach ($all as $piggy) {
$piggy->account()->associate($account);
unset($piggy->leftInAccount);
$piggy->save();
}
}
} else {
\Log::notice('Account not yet imported, hold or 5 minutes.');
@@ -587,7 +589,7 @@ class Import
\Queue::push('Firefly\Queue\Import@cleanImportAccount', ['mapID' => $importMap->id]);
$job->delete(); // count fixed
\Log::debug('Done with job "start"');
}
}