Skip to content

Commit b9d4344

Browse files
author
mastiuhin-olexandr
committed
MC-41351: Cannot remove data using attribute with "File" type in admin area
1 parent 4559910 commit b9d4344

File tree

1 file changed

+3
-0
lines changed
  • app/code/Magento/Customer/Model/Metadata/Form

1 file changed

+3
-0
lines changed

app/code/Magento/Customer/Model/Metadata/Form/File.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,9 @@ public function compactValue($value)
323323
if (!empty($this->_value) && !empty($value['delete'])) {
324324
$this->fileProcessor->removeUploadedFile($this->_value);
325325
return $value;
326+
} else if ($this->_entityTypeCode == 'customer' && empty($value) && !empty($this->_value)) {
327+
$this->fileProcessor->removeUploadedFile($this->_value);
328+
return $value;
326329
}
327330

328331
if ($value && is_string($value) && $this->fileProcessor->isExist($value)) {

0 commit comments

Comments
 (0)