Browse Source

Erreur 500 : Argument 2 passed to Lc\SovBundle\Field\Filter\FilterManager::applyFilter() must be an instance of EasyCorp\Bundle\EasyAdminBundle\Dto\FieldDto, null given #623

develop
Guillaume Bourgeois 2 years ago
parent
commit
1a4a3c1f71
1 changed files with 6 additions and 3 deletions
  1. +6
    -3
      Controller/AbstractAdminController.php

+ 6
- 3
Controller/AbstractAdminController.php View File

@@ -64,9 +64,12 @@ abstract class AbstractAdminController extends SovAbstractAdminController
$controller->configureFields($autocompleteContext['originatingPage'])
)->getByProperty($autocompleteContext['propertyName']);

$filterManager = $this->get(FilterManager::class);
$filteredValue = ['value' => $context->getRequest()->query->get('q')];
$filterManager->applyFilter($repositoryQuery, $field, $filteredValue);
if($field) {
$filterManager = $this->get(FilterManager::class);
$filteredValue = ['value' => $context->getRequest()->query->get('q')];
$filterManager->applyFilter($repositoryQuery, $field, $filteredValue);
}

$repositoryQuery->select('.' . $autocompleteContext['propertyName']);

$responses = array();

Loading…
Cancel
Save