Skip to content

Commit

Permalink
Merge pull request #10531 from nanaya/solo-score-default
Browse files Browse the repository at this point in the history
Add default scope for solo score
  • Loading branch information
notbakaneko authored Sep 8, 2023
2 parents ff2d521 + 3d85e8b commit a4b1a18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Models/Solo/Score.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ public function user()
return $this->belongsTo(User::class, 'user_id');
}

public function scopeDefault(Builder $query): Builder
{
return $query->whereHas('beatmap.beatmapset');
}

/**
* This should match the one used in osu-elastic-indexer.
*/
Expand Down

0 comments on commit a4b1a18

Please sign in to comment.