From: Coleman Watts Date: Mon, 1 Sep 2014 12:50:06 +0000 (+0100) Subject: CRM-15215 - Fix api address validation X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=578d346db8e62a1913ce9781999d5b1781d2a3ca;p=civicrm-core.git CRM-15215 - Fix api address validation --- diff --git a/CRM/Core/BAO/Address.php b/CRM/Core/BAO/Address.php index 5285d7811c..4482d3b5d2 100644 --- a/CRM/Core/BAO/Address.php +++ b/CRM/Core/BAO/Address.php @@ -1185,7 +1185,7 @@ SELECT is_primary, $props['country_id'] = $config->defaultContactCountry; } } - if (!empty($props['country_id'])) { + if (!empty($props['country_id']) && $context !== 'validate') { $params['condition'] = 'country_id IN (' . implode(',', (array) $props['country_id']) . ')'; } break; @@ -1207,4 +1207,4 @@ SELECT is_primary, } return CRM_Core_PseudoConstant::get(__CLASS__, $fieldName, $params, $context); } -} \ No newline at end of file +}