diff --git a/src/cds/src/main/kotlin/org/icpclive/cds/adapters/AdvancedPropertiesAdapter.kt b/src/cds/src/main/kotlin/org/icpclive/cds/adapters/AdvancedPropertiesAdapter.kt index 4c2b46690..884be9893 100644 --- a/src/cds/src/main/kotlin/org/icpclive/cds/adapters/AdvancedPropertiesAdapter.kt +++ b/src/cds/src/main/kotlin/org/icpclive/cds/adapters/AdvancedPropertiesAdapter.kt @@ -251,10 +251,12 @@ internal fun applyAdvancedProperties( } } + val teamInfoWithCustomFields = teamInfosPrelim + .mergeTeams(overrides.teamOverrides?.filterValues { it.customFields != null }?.mapValues { TeamInfoOverride(customFields = it.value.customFields) }) - @Suppress("DEPRECATION") val teamInfos = teamInfosPrelim - .mergeTeams(overrides.teamMediaTemplate?.instantiateTemplate(teamInfosPrelim, TeamInfo::templateValueGetter)) - .mergeTeams(overrides.teamOverrideTemplate?.instantiateTemplate(teamInfosPrelim, TeamInfo::templateValueGetter)) + @Suppress("DEPRECATION") val teamInfos = teamInfoWithCustomFields + .mergeTeams(overrides.teamMediaTemplate?.instantiateTemplate(teamInfoWithCustomFields, TeamInfo::templateValueGetter)) + .mergeTeams(overrides.teamOverrideTemplate?.instantiateTemplate(teamInfoWithCustomFields, TeamInfo::templateValueGetter)) .mergeTeams(overrides.teamOverrides) val problemInfos = mergeProblems(info.problemList, overrides.problemOverrides)