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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user