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

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

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')]
);
}