Skip to content

Commit a691b35

Browse files
committed
MAGETWO-49185: If set Unique Value for attribute to "Yes" then you can see error message after save product
1 parent 7b82efa commit a691b35

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

app/code/Magento/Eav/Model/Entity/AbstractEntity.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,6 @@ public function checkAttributeUniqueValue(AbstractAttribute $attribute, $object)
929929
{
930930
$connection = $this->getConnection();
931931
$select = $connection->select();
932-
$linkField = $object->getResource()->getLinkField();
933932
if ($attribute->getBackend()->getType() === 'static') {
934933
$value = $object->getData($attribute->getAttributeCode());
935934
$bind = ['value' => trim($value)];
@@ -951,7 +950,7 @@ public function checkAttributeUniqueValue(AbstractAttribute $attribute, $object)
951950
];
952951
$select->from(
953952
$attribute->getBackend()->getTable(),
954-
$linkField
953+
$object->getResource()->getLinkField()
955954
)->where(
956955
'attribute_id = :attribute_id'
957956
)->where(

0 commit comments

Comments
 (0)