fix: dont do anything if there are no users

This commit is contained in:
silver 2023-06-18 20:47:36 +01:00
parent e0f15d0ea2
commit 4a0d32083c

View file

@ -88,6 +88,10 @@ async fn update_committee(config: &Config) -> tide::Result<()> {
} }
async fn update_group(config: &Config, group: &str, users: &[&str], replace: bool) -> tide::Result<()> { async fn update_group(config: &Config, group: &str, users: &[&str], replace: bool) -> tide::Result<()> {
if users.is_empty() {
return Ok(());
}
let mut ldap = LdapConn::new(&config.ldap_host)?; let mut ldap = LdapConn::new(&config.ldap_host)?;
// use the admin account // use the admin account