mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
This commit is contained in:
parent
0b069bcb58
commit
9894d16d26
@ -147,7 +147,7 @@ class TriggerController extends Controller
|
||||
// add a range:
|
||||
$ruleEngine->addOperator(['type' => 'date_before', 'value' => $parameters['end']->format('Y-m-d')]);
|
||||
}
|
||||
if (array_key_exists('accounts', $parameters) && '' !== $parameters['accounts']) {
|
||||
if (array_key_exists('accounts', $parameters) && is_array($parameters['accounts']) && count($parameters['accounts']) > 0) {
|
||||
$ruleEngine->addOperator(['type' => 'account_id', 'value' => implode(',', $parameters['accounts'])]);
|
||||
}
|
||||
|
||||
|
@ -71,6 +71,9 @@ class TriggerRequest extends FormRequest
|
||||
|
||||
private function getAccounts(): array
|
||||
{
|
||||
if(null === $this->get('accounts')) {
|
||||
return [];
|
||||
}
|
||||
return $this->get('accounts');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user