Skip to content

Commit

Permalink
feat: filter out people with zero solutions in widget
Browse files Browse the repository at this point in the history
  • Loading branch information
digitlimit committed Mar 3, 2025
1 parent 1157ade commit b31d58e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ public function scopeMostSolutions(Builder $query, ?int $inLastDays = null)
}

return $query;
}])->orderBy('solutions_count', 'desc');
}])
->having('solutions_count', '>', 0)
->orderBy('solutions_count', 'desc');
}

public function scopeMostSubmissions(Builder $query, ?int $inLastDays = null)
Expand Down

0 comments on commit b31d58e

Please sign in to comment.