File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
app/code/Magento/OfflineShipping
Model/ResourceModel/Carrier
Test/Unit/Model/ResourceModel/Carrier Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -298,16 +298,19 @@ public function uploadAndImport(\Magento\Framework\DataObject $object)
298
298
} else {
299
299
$ request = $ this ->requestFactory ->create ();
300
300
$ files = (array )$ request ->getFiles ();
301
+
301
302
if (empty ($ files ['groups ' ]['tablerate ' ]['fields ' ]['import ' ]['value ' ])) {
302
303
return $ this ;
303
304
} else {
304
305
$ filePath = $ files ['groups ' ]['tablerate ' ]['fields ' ]['import ' ]['value ' ]['tmp_name ' ];
305
306
}
306
307
}
308
+ if (!$ filePath ) {
309
+ return $ this ;
310
+ }
307
311
308
312
$ websiteId = $ this ->storeManager ->getWebsite ($ object ->getScopeId ())->getId ();
309
313
$ conditionName = $ this ->getConditionName ($ object );
310
-
311
314
$ file = $ this ->getCsvFile ($ filePath );
312
315
try {
313
316
// delete old data by website and condition name
Original file line number Diff line number Diff line change 11
11
use Magento \Framework \App \DeploymentConfig ;
12
12
use Magento \Framework \App \Request \Http ;
13
13
use Magento \Framework \App \RequestFactory ;
14
- use Magento \Framework \App \RequestInterface ;
15
14
use Magento \Framework \App \ResourceConnection ;
16
15
use Magento \Framework \DB \Adapter \AdapterInterface ;
17
16
use Magento \Framework \Filesystem ;
You can’t perform that action at this time.
0 commit comments