Skip to content
Snippets Groups Projects
Commit b806ffe4 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #12510 TIME 4:00 fixed migration contact

parent bf7e1d1c
No related branches found
No related tags found
No related merge requests found
......@@ -226,6 +226,7 @@ function migrateCustomField($args = [])
if (!empty($value)) {
$contact = \Contact\models\ContactModel::getById(['id' => $args['newContactId'], 'select' => ['custom_fields']]);
$value = json_encode($value);
$value = str_replace("'", "''", $value);
if (empty($contact['custom_fields'])) {
\Contact\models\ContactModel::update([
'postSet' => ['custom_fields' => "jsonb_set('{}', '{{$args['newCustomFields'][$key]}}', '{$value}')"],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment