Skip to content

Commit 062d85e

Browse files
authored
Merge pull request #1914 from ehuss/launching-pad
Handle launching-pad subteams.
2 parents 89eee6e + 0f989ad commit 062d85e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/teams.rs

+7-3
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Data {
5959
self.teams
6060
.into_iter()
6161
.filter(|team| team.website_data.is_some())
62-
.filter(|team| team.subteam_of.is_none())
62+
.filter(|team| matches!(team.subteam_of.as_deref(), None | Some("launching-pad")))
6363
.map(|team| IndexTeam {
6464
url: format!(
6565
"{}/{}",
@@ -98,8 +98,12 @@ impl Data {
9898
.ok_or(TeamNotFound)?;
9999

100100
// Don't show pages for subteams
101-
if main_team.subteam_of.is_some() {
102-
return Err(TeamNotFound.into());
101+
if let Some(subteam) = &main_team.subteam_of {
102+
// Launching-pad does not have a page of its own, but we do want
103+
// to show the working groups that are inside it.
104+
if subteam != "launching-pad" {
105+
return Err(TeamNotFound.into());
106+
}
103107
}
104108

105109
// Then find all the subteams, working groups and project groups.

0 commit comments

Comments
 (0)