Skip to content

Commit

Permalink
Merge pull request #10829 from nanaya/pack-tag-filter
Browse files Browse the repository at this point in the history
Add correct scope for beatmap pack subquery
  • Loading branch information
notbakaneko authored Dec 26, 2023
2 parents 5c3569f + 1cd927c commit 64a820b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/Models/Beatmapset.php
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,12 @@ public function scopeWithPackTags(Builder $query): Builder
$packItemBeatmapsetIdColumn = (new BeatmapPackItem())->qualifyColumn('beatmapset_id');
$packQuery = BeatmapPack
::selectRaw("GROUP_CONCAT({$packTagColumn} SEPARATOR ',')")
->default()
->whereRelation(
'items',
DB::raw("{$packItemBeatmapsetIdColumn}"),
DB::raw("{$idColumn}"),
)->toSql();
DB::raw($packItemBeatmapsetIdColumn),
DB::raw($idColumn),
)->toRawSql();

return $query
->select('*')
Expand Down

0 comments on commit 64a820b

Please sign in to comment.