Fix sport squadra su partite basket e ruoli organico per board.

Le partite ereditano lo sport_key della squadra alla creazione invece del default pallavolo; l'organico mostra ruoli per board (basket, volley, timed) e il wizard Android usa lo sport del team per overlay e icona.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-09 22:32:36 +02:00
parent 01b7a3c96b
commit 34c97f4447
9 changed files with 136 additions and 49 deletions

View File

@@ -17,7 +17,7 @@ module Api
def create
attrs = match_params.to_h
attrs["sport_key"] = @team.sport_key if attrs["sport_key"].blank?
attrs["sport_key"] = @team.sport_key
normalize_scoring_rules!(attrs)
match = @team.matches.create!(attrs)
attach_opponent_logo(match)
@@ -70,6 +70,7 @@ module Api
if p[:sport].present? && p[:sport_key].blank?
p[:sport_key] = p.delete(:sport)
end
p[:overlay_kind] = nil if p.key?(:overlay_kind) && p[:overlay_kind].blank?
p
end