Fix slightly broken logic

This commit is contained in:
Bruce Leidl 2021-11-29 16:18:11 -05:00
parent 160fc47494
commit ea70bfc65e

View File

@ -142,12 +142,13 @@ impl RealmsManagerProxy<'_> {
}
pub fn create_new_realm(&self, realm: &str, config: Vec<(String, String)>) -> Result<()> {
if self.create_realm(realm)? && !config.is_empty() {
if self.create_realm(realm)? {
if !config.is_empty() {
self.realm_set_config(realm, config)?;
}
} else {
return Err(Error::CreateRealmFailed);
}
Ok(())
}
}