mirror of https://github.com/MISP/MISP
fixes bug in discovered while running migrate02to021 script
parent
6e9f0f0d24
commit
97a5790938
|
@ -183,6 +183,7 @@ class Attribute extends AppModel {
|
|||
|
||||
// explode value of composite type in value1 and value2
|
||||
// or copy value to value1 if not composite type
|
||||
if (!empty($this->data['Attribute']['type'])) {
|
||||
$composite_types = $this->getCompositeTypes();
|
||||
if (in_array($this->data['Attribute']['type'], $composite_types)) {
|
||||
// explode composite types in value1 and value2
|
||||
|
@ -193,6 +194,7 @@ class Attribute extends AppModel {
|
|||
} else {
|
||||
$this->data['Attribute']['value1'] = $this->data['Attribute']['value'];
|
||||
}
|
||||
}
|
||||
|
||||
// always return true after a beforeSave()
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue