Skip to content
Snippets Groups Projects
Commit e9c9b0d1 authored by mattwire's avatar mattwire
Browse files

If the entity is not set allow the condition to be edited and saved

parent 4bb46dd9
No related branches found
No related tags found
No related merge requests found
......@@ -65,6 +65,12 @@ abstract class CRM_CivirulesConditions_Generic_ValueComparison extends CRM_Civir
* @throws \CiviCRM_API3_Exception
*/
protected function getComparisonValue() {
if (empty($conditionParams['entity'])) {
// The entity is required. It should always be set but may not be if the condition was not saved properly
// and you can't edit the rule if it does not have the data.
return '';
}
$entity = $this->conditionParams['entity'];
$field = $this->conditionParams['field'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment