mirror of https://github.com/MISP/MISP
Deleting tags fixed
- now it correctly deletes tags - also deletes all EventTagspull/219/merge
parent
5796320e84
commit
914687142e
|
@ -73,7 +73,8 @@ class TagsController extends AppController {
|
|||
if (!$this->Tag->exists()) {
|
||||
throw new NotFoundException('Invalid tag');
|
||||
}
|
||||
if ($this->Attribute->delete()) {
|
||||
if ($this->Tag->delete()) {
|
||||
$this->Tag->EventTag->deleteAll(array('EventTag.tag_id' => $id));
|
||||
$this->Session->setFlash(__('Attribute deleted'));
|
||||
} else {
|
||||
$this->Session->setFlash(__('Attribute was not deleted'));
|
||||
|
|
Loading…
Reference in New Issue