Skip to content

Commit

Permalink
feat: only query if filter exists
Browse files Browse the repository at this point in the history
  • Loading branch information
keeama13 committed Jan 3, 2024
1 parent 89fd79e commit 4bfc449
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Services/Assets/TableQueryService.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ private function setFilter(Builder $query)
{
if (request()->query('filter')) {
foreach (request()->query('filter') as $key => $value) {
$query->where($key, '=', $value);
if($this->table->items()->where('type', 'Filter')->where('internal', $key)->first())
{
$query->where($key, '=', $value);
}
}
}

Expand Down

0 comments on commit 4bfc449

Please sign in to comment.