Commit 80ea7f08 authored by Mathieu Lutfy's avatar Mathieu Lutfy Committed by Aegir user
Browse files

CRM/Activityprofile/APIWrappers/Profile: unset group_id if empty, otherwise API error.

parent c0c71421
......@@ -28,6 +28,11 @@ class CRM_Activityprofile_APIWrappers_Profile {
// Fields such as group_id will fail if empty
if (isset($apiRequest['params']['group_id']) && empty($apiRequest['params']['group_id'])) {
// This is a profile with activity fields, but without an activity_id
// Let's create a new contact and a new activity.
// We only do the minimum and let profile.submit do the rest.
Markdown is supported
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