Skip to content
Snippets Groups Projects
Commit fab04f24 authored by colemanw's avatar colemanw
Browse files

Merge pull request #377 from eileenmcnaughton/4.3

fix for api tests - problem was apparent when entity_ name was in camel case e.g Case
parents fea42c98 cddb5b6f
Branches
Tags
No related merge requests found
......@@ -69,7 +69,7 @@ function civicrm_api3_generic_getfields($apiRequest) {
$unique = FALSE;
case 'get':
$metadata = _civicrm_api_get_fields($apiRequest['entity'], $unique, $apiRequest['params']);
if (empty($metadata['id']) && !empty($metadata[$apiRequest['entity'] . '_id'])) {
if (empty($metadata['id']) && !empty($metadata[strtolower($apiRequest['entity']) . '_id'])) {
$metadata['id'] = $metadata[$lcase_entity . '_id'];
$metadata['id']['api.aliases'] = array($lcase_entity . '_id');
unset($metadata[$lcase_entity . '_id']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment