🔧 prevent missing index warnings
This commit is contained in:
parent
0ba0674412
commit
968bb9d831
3 changed files with 9 additions and 7 deletions
|
@ -27,6 +27,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
||||||
$this->id_custom_field = Cache::getInstance()
|
$this->id_custom_field = Cache::getInstance()
|
||||||
->getCustomFieldMapping()['twingle_event_id'];
|
->getCustomFieldMapping()['twingle_event_id'];
|
||||||
|
|
||||||
|
if (isset($this->values['parent_id'])) {
|
||||||
try {
|
try {
|
||||||
$this->values['parent_id'] = $this->getParentCampaignId();
|
$this->values['parent_id'] = $this->getParentCampaignId();
|
||||||
} catch (CiviCRM_API3_Exception $e) {
|
} catch (CiviCRM_API3_Exception $e) {
|
||||||
|
@ -34,6 +35,7 @@ class CRM_TwingleCampaign_BAO_TwingleEvent extends Campaign {
|
||||||
throw new Exception("Could not identify parent Campaign: $errorMessage");
|
throw new Exception("Could not identify parent Campaign: $errorMessage");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -238,7 +238,7 @@ function civicrm_api3_twingle_event_Sync(array $params): array {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is a test, do not make db changes
|
// If this is a test, do not make db changes
|
||||||
if ($params['is_test']) {
|
if (isset($params['is_test']) && $params['is_test']) {
|
||||||
$result_values[$event->getId()] =
|
$result_values[$event->getId()] =
|
||||||
$event->getResponse('Ready to create TwingleEvent');
|
$event->getResponse('Ready to create TwingleEvent');
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,7 @@ function civicrm_api3_twingle_project_Sync(array $params): array {
|
||||||
);
|
);
|
||||||
|
|
||||||
// If this is a test, do not make db changes
|
// If this is a test, do not make db changes
|
||||||
if ($params['is_test']) {
|
if (isset($params['is_test']) && $params['is_test']) {
|
||||||
$returnValues[$project->getId()] =
|
$returnValues[$project->getId()] =
|
||||||
$project->getResponse('Ready to create TwingleProject');
|
$project->getResponse('Ready to create TwingleProject');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue