mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 15:05:42 +00:00
Merge pull request #622 from creative-commoners/pulls/4.2/cache-display-rules-model-loads
Use get_by_id on display rules model loads to ensure they get cached
This commit is contained in:
commit
a1a7a0f51f
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user