Skip to content

Commit e690232

Browse files
committed
refactor: solve team comparison gaps
1 parent e994cd3 commit e690232

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/modules/analytics/controllers/team_comparison_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Controllers
77
# with advanced filtering options
88
class TeamComparisonController < Api::V1::BaseController
99
def index
10-
players = fetch_active_players
10+
players = fetch_roster_players
1111
matches = build_matches_query
1212

1313
comparison_data = build_comparison_data(players, matches)
@@ -17,8 +17,8 @@ def index
1717

1818
private
1919

20-
def fetch_active_players
21-
organization_scoped(Player).includes(:organization).active
20+
def fetch_roster_players
21+
organization_scoped(Player).includes(:organization).where(status: %w[active benched trial])
2222
end
2323

2424
def build_matches_query

0 commit comments

Comments
 (0)