mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 07:34:43 +00:00
Optimize queries for statistics.
This commit is contained in:
@@ -44,12 +44,12 @@ class ChartData
|
||||
public function add(array $data): void
|
||||
{
|
||||
if (array_key_exists('currency_id', $data)) {
|
||||
$data['currency_id'] = (string) $data['currency_id'];
|
||||
$data['currency_id'] = (string)$data['currency_id'];
|
||||
}
|
||||
if (array_key_exists('primary_currency_id', $data)) {
|
||||
$data['primary_currency_id'] = (string) $data['primary_currency_id'];
|
||||
$data['primary_currency_id'] = (string)$data['primary_currency_id'];
|
||||
}
|
||||
$required = ['start', 'date', 'end', 'entries'];
|
||||
$required = ['start', 'date', 'end', 'entries'];
|
||||
foreach ($required as $field) {
|
||||
if (!array_key_exists($field, $data)) {
|
||||
throw new FireflyException(sprintf('Data-set is missing the "%s"-variable.', $field));
|
||||
|
Reference in New Issue
Block a user