fix: validation issue for objects fixed

pull/3267/head
iglocska 2018-05-15 08:48:20 +02:00
parent b4071aafb0
commit 5a269a8a9a
1 changed files with 1 additions and 1 deletions

View File

@ -756,7 +756,7 @@ class Attribute extends AppModel {
public function valueIsUnique ($fields) {
if (isset($this->data['Attribute']['deleted']) && $this->data['Attribute']['deleted']) return true;
// We escape this rule for objects as we can have the same category/type/value combination in different objects
if (!empty($this->data['Attribute']['object_id'])) {
if (!empty($this->data['Attribute']['object_relation'])) {
return true;
}
$value = $fields['value'];