Update
This commit is contained in:
parent
c32356b2bc
commit
487974a07c
|
@ -114,32 +114,22 @@ async fn teachers(
|
||||||
.teacher_reports()
|
.teacher_reports()
|
||||||
.await?
|
.await?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter_map(|t| {
|
.map(|t| User {
|
||||||
if t.long_name.starts_with("Abi-Aufsicht")
|
username: {
|
||||||
|| t.long_name == "SBBZ"
|
let escaped = escape_username(&t.name);
|
||||||
|| t.long_name == "N.N."
|
match usernames.get_mut(&escaped) {
|
||||||
|| t.long_name == "Werkrealschule"
|
Some(x) => {
|
||||||
{
|
*x += 1;
|
||||||
None
|
format!("{}{}", escaped, x)
|
||||||
} else {
|
}
|
||||||
Some(User {
|
None => {
|
||||||
username: {
|
usernames.insert(escaped.to_owned(), 1);
|
||||||
let escaped = escape_username(&t.name);
|
escaped
|
||||||
match usernames.get_mut(&escaped) {
|
}
|
||||||
Some(x) => {
|
}
|
||||||
*x += 1;
|
},
|
||||||
format!("{}{}", escaped, x)
|
first_name: t.fore_name,
|
||||||
}
|
last_name: escape_last_name(&t.long_name).to_string(),
|
||||||
None => {
|
|
||||||
usernames.insert(escaped.to_owned(), 1);
|
|
||||||
escaped
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
first_name: t.fore_name,
|
|
||||||
last_name: escape_last_name(&t.long_name).to_string(),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.collect())
|
.collect())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue