Fix withoutExternalUrl query and add search modifiers

Co-authored-by: JC5 <james@firefly-iii.org>
This commit is contained in:
George Hahn
2022-01-24 23:03:33 -07:00
parent 0a5908e4d8
commit ecda8eebf2
2 changed files with 8 additions and 2 deletions

View File

@@ -221,8 +221,12 @@ trait MetaCollection
$this->hasJoinedMetaTables = true;
$this->query->leftJoin('journal_meta', 'transaction_journals.id', '=', 'journal_meta.transaction_journal_id');
}
$this->query->where('journal_meta.name', '=', 'external_url');
$this->query->whereNull('journal_meta.data');
$this->query->where(function(Builder $q1) {
$q1->where(function(Builder $q2) {
$q2->where('journal_meta.name', '=', 'external_url');
$q2->whereNull('journal_meta.data');
})->orWhereNull('journal_meta.name');
});
return $this;
}