Skip to content

Commit

Permalink
Merge pull request #1743 from silverstripeltd/pulls/1.13/fix-model-ad…
Browse files Browse the repository at this point in the history
…min-import

FIX: Update model class importer key
  • Loading branch information
GuySartorelli committed May 9, 2024
2 parents 66a937a + 78eb177 commit 6925ecb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion code/ModelAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ public function import(array $data, Form $form): HTTPResponse

$importers = $this->getModelImporters();
/** @var BulkLoader $loader */
$loader = $importers[$this->modelClass];
$loader = $importers[$this->modelTab];

// File wasn't properly uploaded, show a reminder to the user
if (empty($_FILES['_CsvFile']['tmp_name']) ||
Expand Down
3 changes: 1 addition & 2 deletions tests/php/ModelAdminTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
use SilverStripe\Control\HTTPRequest;
use SilverStripe\Control\Session;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\Dev\FunctionalTest;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldExportButton;
use SilverStripe\Forms\GridField\GridFieldImportButton;
use SilverStripe\Forms\GridField\GridFieldPrintButton;
use SilverStripe\Security\Permission;
use SilverStripe\Dev\FunctionalTest;
use SilverStripe\View\ArrayData;

class ModelAdminTest extends FunctionalTest
{
Expand Down

0 comments on commit 6925ecb

Please sign in to comment.