Skip to content

Commit

Permalink
FIX Do not default to viewing blocks when selecting others
Browse files Browse the repository at this point in the history
  • Loading branch information
emteknetnz committed Feb 12, 2024
1 parent 1994a22 commit 1b55035
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ArchiveAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function getEditForm($id = null, $fields = null)
{
$fields = FieldList::create();
$modelClass = $this->request->getVar('others') ? 'others' : $this->modelClass;
$classInst = Injector::inst()->get($this->modelClass);
$classInst = $modelClass !== 'others' ? Injector::inst()->get($this->modelClass) : null;

if (ClassInfo::hasMethod($classInst, 'getArchiveField')) {
$listField = $classInst->getArchiveField();
Expand Down

0 comments on commit 1b55035

Please sign in to comment.