mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
[person search] fix bug when using birhtdateafter and birthdate before on advanced search
This commit is contained in:
parent
e99b14b870
commit
54a4b48174
@ -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
|
||||
|
||||
|
@ -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')]
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user