Skip to content

Clear owner's project cache after deleting organization #3794

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 7 commits into from
Jun 26, 2025
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
9 changes: 7 additions & 2 deletions apps/labrinth/src/routes/v3/organizations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,13 @@ pub async fn organization_delete(
)
.await?;

for team_id in organization_project_teams {
database::models::DBTeamMember::clear_cache(team_id, &redis).await?;
for team_id in &organization_project_teams {
database::models::DBTeamMember::clear_cache(*team_id, &redis).await?;
}

if !organization_project_teams.is_empty() {
database::models::DBUser::clear_project_cache(&[owner_id], &redis)
.await?;
}

if result.is_some() {
Expand Down
Loading