chg: [attributes] fix copypasta error leading to internal server error on addtag with tag name

pull/7129/merge
Jeroen Pinoy 2021-03-07 00:14:42 +00:00 committed by Alexandre Dulaunoy
parent 91b82178a5
commit 8913fe15cc
No known key found for this signature in database
GPG Key ID: 09E2CD4944E6CBCD
1 changed files with 1 additions and 1 deletions

View File

@ -2678,7 +2678,7 @@ class AttributesController extends AppController
}
}
} else {
$tag = $this->Event->EventTag->Tag->find('first', array('recursive' => -1, 'conditions' => $conditions));
$tag = $this->Attribute->AttributeTag->Tag->find('first', array('recursive' => -1, 'conditions' => $conditions));
if (empty($tag)) {
return new CakeResponse(array('body'=> json_encode(array('saved' => false, 'errors' => 'Invalid Tag.')), 'status'=>200, 'type' => 'json'));
}