Commit 07575b42 authored by Quentin Ribac's avatar Quentin Ribac
Browse files

FIX #18154 TIME 0:15 fixed contact import with civility

parent 453b6a7c
......@@ -143,12 +143,17 @@ class ContactCivilityController
ValidatorModel::notEmpty($args, ['label']);
ValidatorModel::stringType($args, ['label']);
$civility = ContactCivilityModel::get(['select' => ['id'], 'where' => ['label = ?'], 'data' => [$args['label']], 'limit' => 1]);
$civility = ContactCivilityModel::get([
'select' => ['id'],
'where' => ['label ilike ?'],
'data' => [$args['label']],
'limit' => 1
]);
if (empty($civility)) {
return '';
}
return $civility['id'];
return $civility[0]['id'];
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment