Skip to content

Commit 30f48cb

Browse files
committed
fix: solve player import to roster issue
o index mostra targets globais sem excluir signed por padrão. Após o import, o watchlist da org é destruído e o status vira signed, mas o endpoint continua retornando o player
1 parent 92f8056 commit 30f48cb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/modules/scouting/controllers/players_controller.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,11 @@ def apply_basic_filters(targets)
272272
roles = params[:role].split(',').map(&:strip).reject(&:blank?)
273273
targets = targets.by_role(roles) if roles.any?
274274
end
275-
targets = targets.by_status(params[:status]) if params[:status].present?
275+
if params[:status].present?
276+
targets = targets.by_status(params[:status])
277+
else
278+
targets = targets.where.not(status: 'signed')
279+
end
276280
targets = targets.by_region(params[:region]) if params[:region].present?
277281

278282
# Filter by watchlist fields if in watchlist mode

0 commit comments

Comments
 (0)