mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix tests.
This commit is contained in:
parent
cde494d3ef
commit
0e11245cb4
@ -375,13 +375,16 @@ class CategoryReportController extends Controller
|
||||
$currentStart->addDay();
|
||||
}
|
||||
// remove all empty entries to prevent cluttering:
|
||||
$newSet = [];
|
||||
foreach ($chartData as $key => $entry) {
|
||||
if (array_sum($entry['entries']) == 0) {
|
||||
unset($chartData[$key]);
|
||||
if (!array_sum($entry['entries']) == 0) {
|
||||
$newSet[$key] = $chartData[$key];
|
||||
}
|
||||
}
|
||||
|
||||
$data = $this->generator->multiSet($chartData);
|
||||
if (count($newSet) === 0) {
|
||||
$newSet = $chartData;
|
||||
}
|
||||
$data = $this->generator->multiSet($newSet);
|
||||
$cache->store($data);
|
||||
|
||||
return Response::json($data);
|
||||
|
Loading…
Reference in New Issue
Block a user