From 1b6ce3bf4b55f466877ba5bfcff37795ba9f6993 Mon Sep 17 00:00:00 2001 From: Daniele Cantarini <562815+cantarini@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:17:29 +0100 Subject: [PATCH] Update DecayingModelController.php Found a bug importing DecayingModels to a new instance that hinders the Decaying Model Mapping with attribute types --- app/Controller/DecayingModelController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Controller/DecayingModelController.php b/app/Controller/DecayingModelController.php index 0d1394ea1..7267eaaf1 100644 --- a/app/Controller/DecayingModelController.php +++ b/app/Controller/DecayingModelController.php @@ -55,9 +55,9 @@ class DecayingModelController extends AppController $json['org_id'] = $this->Auth->user()['org_id']; $attribute_types = array(); - if (!empty($json['attribute_types'])) { - $attribute_types = $json['attribute_types']; - unset($json['attribute_types']); + if (!empty($json['DecayingModel']['attribute_types'])) { + $attribute_types = $json['DecayingModel']['attribute_types']; + unset($json['DecayingModel']['attribute_types']); } if ($this->DecayingModel->save($json)) {