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