allow empty date in export (#1338)

This commit is contained in:
Kevin Papst
2019-12-31 20:24:47 +01:00
committed by GitHub
parent baac4eb698
commit 022dbe32e5
5 changed files with 12 additions and 7 deletions

View File

@@ -143,8 +143,12 @@ class ExportController extends AbstractController
*/
protected function getEntries(ExportQuery $query): array
{
$query->getBegin()->setTime(0, 0, 0);
$query->getEnd()->setTime(23, 59, 59);
if (null !== $query->getBegin()) {
$query->getBegin()->setTime(0, 0, 0);
}
if (null !== $query->getEnd()) {
$query->getEnd()->setTime(23, 59, 59);
}
return $this->timesheetRepository->getTimesheetsForQuery($query, true);
}