fix: [dashboard:organisationMapWidget] Do not require the config to have start and end date

pull/9296/head
Sami Mokaddem 2023-09-07 11:35:45 +02:00
parent ed61d9ecb4
commit 5e68773dbb
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 2 additions and 2 deletions

View File

@ -60,9 +60,9 @@ class OrganisationMapWidget
}
}
}
if ($options['start_date']) {
if (!empty($options['start_date'])) {
$params['conditions']['AND']['Organisation.date_created >='] = (new DateTime($options['start_date']))->format('Y-m-d H:i:s');
if (empty($options['end_date'])) {
if (!empty($options['end_date'])) {
$params['conditions']['AND']['Organisation.date_created <='] = (new DateTime($options['end_date']))->format('Y-m-d H:i:s');
}
}