Skip to content

Commit

Permalink
fix filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioMendolia committed Sep 23, 2023
1 parent 4840f91 commit ba00c47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Form/BookFilterType.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'mapped' => false,
'target_callback' => function (QueryBuilder $qb, ?string $readValue): void {

if ($readValue !== null) {
if ($readValue !== null && $readValue !== '') {
$qb->andWhere($qb->expr()->like('book.extension', ':extension'));
$qb->setParameter('extension', $readValue);
}
Expand Down
1 change: 1 addition & 0 deletions src/Service/FilteredBookUrlGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class FilteredBookUrlGenerator
'read' => '',
'picture' => '',
'favorite' => '',
'extension' => '',
'verified' => '',
'orderBy' => '',
'submit' => '',
Expand Down

0 comments on commit ba00c47

Please sign in to comment.