fixing contactdetail empty not delete
This commit is contained in:
parent
501ef06592
commit
e5d51dff86
@ -103,12 +103,12 @@ class Contact extends Controller {
|
|||||||
if (!$ContactID) { throw new \RuntimeException('Failed to insert contact'); }
|
if (!$ContactID) { throw new \RuntimeException('Failed to insert contact'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($input['Details'])) {
|
|
||||||
$result = $detailModel->syncDetails($ContactID, $input['Details']);
|
$result = $detailModel->syncDetails($ContactID, $input['Details']);
|
||||||
if ($result['status'] !== 'success') {
|
if ($result['status'] !== 'success') {
|
||||||
throw new \RuntimeException('Failed to sync details: ' . $result['message']);
|
throw new \RuntimeException('Failed to sync details: ' . $result['message']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$db->transComplete();
|
$db->transComplete();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user