File tree Expand file tree Collapse file tree 1 file changed +14
-9
lines changed
app/code/Magento/Sales/Model/ResourceModel Expand file tree Collapse file tree 1 file changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -93,15 +93,20 @@ public function refresh($value, $field = null)
93
93
{
94
94
$ select = $ this ->getGridOriginSelect ()
95
95
->where (($ field ?: $ this ->mainTableName . '.entity_id ' ) . ' = ? ' , $ value );
96
- return $ this ->getConnection ()->query (
97
- $ this ->getConnection ()
98
- ->insertFromSelect (
99
- $ select ,
100
- $ this ->getTable ($ this ->gridTableName ),
101
- array_keys ($ this ->columns ),
102
- AdapterInterface::INSERT_ON_DUPLICATE
103
- )
104
- );
96
+ $ sql = $ this ->getConnection ()
97
+ ->insertFromSelect (
98
+ $ select ,
99
+ $ this ->getTable ($ this ->gridTableName ),
100
+ array_keys ($ this ->columns ),
101
+ AdapterInterface::INSERT_ON_DUPLICATE
102
+ );
103
+
104
+ $ this ->addCommitCallback (function () use ($ sql ) {
105
+ $ this ->getConnection ()->query ($ sql );
106
+ });
107
+
108
+ // need for backward compatibility
109
+ return $ this ->getConnection ()->query ($ sql );
105
110
}
106
111
107
112
/**
You can’t perform that action at this time.
0 commit comments