mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
This commit is contained in:
@@ -1949,12 +1949,17 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
|
|
||||||
// get accounts:
|
// get accounts:
|
||||||
$accounts = $this->accountRepository->searchAccount($value, $searchTypes, 1337);
|
$accounts = $this->accountRepository->searchAccount($value, $searchTypes, 1337);
|
||||||
if (0 === $accounts->count()) {
|
if (0 === $accounts->count() && false === $prohibited) {
|
||||||
app('log')->debug('Found zero accounts, search for non existing account, NO results will be returned.');
|
app('log')->debug('Found zero accounts, search for non existing account, NO results will be returned.');
|
||||||
$this->collector->findNothing();
|
$this->collector->findNothing();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (0 === $accounts->count() && true === $prohibited) {
|
||||||
|
app('log')->debug('Found zero accounts, but the search is negated, so effectively we ignore the search parameter.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
app('log')->debug(sprintf('Found %d accounts, will filter.', $accounts->count()));
|
app('log')->debug(sprintf('Found %d accounts, will filter.', $accounts->count()));
|
||||||
$filtered = $accounts->filter(
|
$filtered = $accounts->filter(
|
||||||
static function (Account $account) use ($value, $stringMethod) {
|
static function (Account $account) use ($value, $stringMethod) {
|
||||||
|
Reference in New Issue
Block a user