Skip to content

Commit d0f4070

Browse files
committed
MAGETWO-48286: "Create/Edit Customer" Admin forms do not support data validation without refreshing
1 parent f90b3ab commit d0f4070

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

app/code/Magento/CatalogRule/Model/Rule/DataProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public function getData()
7474
$rule = $this->collection->getNewEmptyItem();
7575
$rule->setData($data);
7676
$this->loadedData[$rule->getId()] = $rule->getData();
77+
$this->dataPersistor->clear('catalog_rule');
7778
}
7879

7980
return $this->loadedData;

app/code/Magento/CatalogRule/Test/Unit/Model/Rule/DataProviderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ public function testGetDataIfRulePersisted()
8484
->method('get')
8585
->with('catalog_rule')
8686
->willReturn($persistedData);
87+
$this->dataPersistorMock->expects($this->once())
88+
->method('clear')
89+
->with('catalog_rule');
8790

8891
$newRuleMock = $this->getMock('Magento\CatalogRule\Model\Rule', [], [], '', false);
8992
$newRuleMock->expects($this->atLeastOnce())->method('setData')->with($persistedData)->willReturnSelf();

app/code/Magento/Theme/Model/Design/Config/DataProvider/DataLoader.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ protected function loadData($scope, $scopeId)
8080
&& $storedData['scope'] == $scope && $storedData['scope_id'] == $scopeId
8181
) {
8282
$data[$scope] = $storedData;
83+
$this->dataPersistor->clear('theme_design_config');
8384
}
8485

8586
return $data;

app/code/Magento/Theme/Test/Unit/Model/Design/Config/DataProvider/DataLoaderTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ public function testGetDataWithNoItems()
102102
->method('get')
103103
->with('theme_design_config')
104104
->willReturn(['scope' => $scope, 'scope_id' => $scopeId]);
105+
$this->dataPersistor->expects($this->once())
106+
->method('clear')
107+
->with('theme_design_config');
105108

106109
$result = $this->model->getData();
107110

0 commit comments

Comments
 (0)