Skip to content

Commit

Permalink
Support using overridden customFields in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
kunyavskiy committed Nov 4, 2023
1 parent 057a850 commit 650afac
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 650afac

Please sign in to comment.