fixes bug in discovered while running migrate02to021 script

pull/61/head
Christophe Vandeplas 2012-04-25 13:56:25 +02:00
parent 6e9f0f0d24
commit 97a5790938
1 changed files with 11 additions and 9 deletions

View File

@ -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;