1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-21 00:41:34 +02:00

Merge pull request #3960 from turbo124/v2

Migration improvements
This commit is contained in:
David Bomba 2020-08-05 10:13:35 +10:00 committed by GitHub
commit 64d7edf513
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -79,6 +79,8 @@ class SelfUpdateController extends BaseController
}
catch(GitException $e) {
info($e->getMessage());
return response()->json(['message'=>$e->getMessage()], 500);
}
info("Are there any changes to pull? " . $repo->hasChanges());

View File

@ -392,6 +392,8 @@ class Import implements ShouldQueue
)
);
$client->contacts()->forceDelete();
if (array_key_exists('contacts', $resource)) { // need to remove after importing new migration.json
$modified_contacts = $resource['contacts'];
@ -403,9 +405,11 @@ class Import implements ShouldQueue
unset($modified_contacts[$key]['id']);
}
$saveable_contacts['contacts'] = $modified_contacts;
$contact_repository->save($saveable_contacts, $client);
}
$key = "clients_{$resource['id']}";