From f24af09f00b32e2fb7e22c2bbdf4349be35fdb24 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 21 Jun 2017 14:14:17 +1200 Subject: [PATCH] Use get_by_id on display rules model loads to ensure they get cached --- code/model/UserDefinedForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/model/UserDefinedForm.php b/code/model/UserDefinedForm.php index 98ee0ab..f808fc3 100755 --- a/code/model/UserDefinedForm.php +++ b/code/model/UserDefinedForm.php @@ -455,7 +455,7 @@ class UserDefinedForm_Controller extends Page_Controller foreach ($field->EffectiveDisplayRules() as $rule) { // Get the field which is effected - $formFieldWatch = EditableFormField::get()->byId($rule->ConditionFieldID); + $formFieldWatch = DataObject::get_by_id('EditableFormField', $rule->ConditionFieldID); // Skip deleted fields if (!$formFieldWatch) {