Merge pull request 'don't show external cox as cox' (#343) from staging into main
All checks were successful
CI/CD Pipeline / test (push) Successful in 11m27s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Successful in 5m25s

Reviewed-on: #343
This commit is contained in:
philipp 2024-04-06 18:40:29 +02:00
commit 073b2aca04

View File

@ -67,6 +67,7 @@ async fn steering(db: &State<SqlitePool>, user: User, flash: Option<FlashMessage
let mut coxes = User::all_with_role(db, &Role::find_by_name(db, "cox").await.unwrap()).await; let mut coxes = User::all_with_role(db, &Role::find_by_name(db, "cox").await.unwrap()).await;
coxes.retain(|user| !bootskundige.contains(&user)); // Remove bootskundige from coxes list coxes.retain(|user| !bootskundige.contains(&user)); // Remove bootskundige from coxes list
coxes.retain(|user| user.name != String::from("Externe Steuerperson"));
context.insert("coxes", &coxes); context.insert("coxes", &coxes);
context.insert("bootskundige", &bootskundige); context.insert("bootskundige", &bootskundige);