Skip to content

Handle launching-pad subteams. #1914

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/teams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ impl Data {
self.teams
.into_iter()
.filter(|team| team.website_data.is_some())
.filter(|team| team.subteam_of.is_none())
.filter(|team| matches!(team.subteam_of.as_deref(), None | Some("launching-pad")))
.map(|team| IndexTeam {
url: format!(
"{}/{}",
Expand Down Expand Up @@ -98,8 +98,12 @@ impl Data {
.ok_or(TeamNotFound)?;

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

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