[person search] fix bug when using birhtdateafter and birthdate before on advanced search

This commit is contained in:
Julien Fastré 2021-11-29 23:11:13 +01:00
parent e99b14b870
commit 54a4b48174
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ and this project adheres to
## Unreleased
<!-- write down unreleased development here -->
* [person search] fix bug when using birthdate after and birthdate before
## Test releases

View File

@ -180,14 +180,14 @@ final class PersonACLAwareRepository implements PersonACLAwareRepositoryInterfac
if (null !== $birthdateBefore) {
$query->andWhereClause(
'p.birthdate < ?::date',
'person.birthdate <= ?::date',
[$birthdateBefore->format('Y-m-d')]
);
}
if (null !== $birthdateAfter) {
$query->andWhereClause(
'p.birthdate > ?::date',
'person.birthdate >= ?::date',
[$birthdateAfter->format('Y-m-d')]
);
}