Commit 6947cb10 authored by Aegir user's avatar Aegir user
Browse files

Fixes a bug when adding/editing fields on a profile (caused by a cache flush)

parent 78a8cd0c
......@@ -7,6 +7,12 @@ class CRM_Activityprofile_APIWrappers_Profile {
public function fromApiInput($apiRequest) {
$params = $apiRequest['params'];
// Ex: for when CiviCRM core clears the profile cache
if ($apiRequest['action'] == 'getfields' && empty($params['profile_id'])) {
return $apiRequest;
$profile_id = _civicrm_api3_profile_getProfileID($params['profile_id']);
$isContactActivityProfile = CRM_Core_BAO_UFField::checkContactActivityProfileType($profile_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