Exclude dateless tasks from calendar API

This commit is contained in:
Lauri Niskanen 2021-02-21 09:10:52 +02:00
parent 3d82c9abbd
commit 3766670fa6
No known key found for this signature in database
GPG Key ID: 807DCEAC3AEB1848

View File

@ -36,6 +36,8 @@ class CalendarService extends BaseService
$titlePrefix = $this->getLocalizationService()->__t('Task due') . ': '; $titlePrefix = $this->getLocalizationService()->__t('Task due') . ': ';
foreach ($this->getTasksService()->GetCurrent() as $currentTaskEntry) foreach ($this->getTasksService()->GetCurrent() as $currentTaskEntry)
{
if (!empty($currentTaskEntry->due_date))
{ {
$taskEvents[] = [ $taskEvents[] = [
'title' => $titlePrefix . $currentTaskEntry->name, 'title' => $titlePrefix . $currentTaskEntry->name,
@ -45,6 +47,7 @@ class CalendarService extends BaseService
]; ];
} }
} }
}
$choreEvents = []; $choreEvents = [];