mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
Force remove stale contacts
This commit is contained in:
parent
b89ee61bba
commit
c245125be4
@ -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']}";
|
||||
|
Loading…
Reference in New Issue
Block a user