File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
app/code/Magento/ImportExport/Model Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,11 @@ protected function _saveValidatedBunches()
420
420
$ startNewBunch = false ;
421
421
422
422
$ source ->rewind ();
423
- $ this ->_dataSourceModel ->cleanProcessedBunches ();
423
+ if ($ this ->ids ) {
424
+ $ this ->_dataSourceModel ->cleanProcessedBunches ();
425
+ } else {
426
+ $ this ->_dataSourceModel ->cleanBunches ();
427
+ }
424
428
$ mainAttributeCode = $ this ->getMasterAttributeCode ();
425
429
426
430
while ($ source ->valid () || count ($ bunchRows ) || isset ($ entityGroup )) {
Original file line number Diff line number Diff line change @@ -394,7 +394,11 @@ protected function _saveValidatedBunches()
394
394
$ skuSet = [];
395
395
396
396
$ source ->rewind ();
397
- $ this ->_dataSourceModel ->cleanProcessedBunches ();
397
+ if ($ this ->ids ) {
398
+ $ this ->_dataSourceModel ->cleanProcessedBunches ();
399
+ } else {
400
+ $ this ->_dataSourceModel ->cleanBunches ();
401
+ }
398
402
399
403
while ($ source ->valid () || $ bunchRows ) {
400
404
if ($ startNewBunch || !$ source ->valid ()) {
Original file line number Diff line number Diff line change @@ -116,7 +116,6 @@ public function cleanBunches()
116
116
return $ this ->getConnection ()->delete ($ this ->getMainTable ());
117
117
}
118
118
119
-
120
119
/**
121
120
* Clean all bunches from table.
122
121
*
@@ -141,10 +140,11 @@ public function cleanProcessedBunches()
141
140
*/
142
141
public function markProcessedBunches (array $ ids ): void
143
142
{
143
+ $ where = $ ids ? ['id IN (?) ' => $ ids ] : '' ;
144
144
$ this ->getConnection ()->update (
145
145
$ this ->getMainTable (),
146
146
['is_processed ' => '1 ' ],
147
- [ ' id IN (?) ' => $ ids ]
147
+ $ where
148
148
);
149
149
}
150
150
You can’t perform that action at this time.
0 commit comments