app: Clean up code, don't error on admin empty email

This commit is contained in:
Valentin Tolmer
2024-10-02 20:40:06 +02:00
committed by nitnelave
parent dcba3d17dc
commit 17bcd7645b
6 changed files with 144 additions and 152 deletions

View File

@@ -277,6 +277,7 @@ impl<Handler: BackendHandler> Mutation<Handler> {
.remove_attributes
.unwrap_or_default()
.into_iter()
.filter(|attr| attr != "mail") // mail can be sent when editing an admin user
.map(Into::into)
.collect(),
insert_attributes,