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<()> { 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)? {
self.realm_set_config(realm, config)?; if !config.is_empty() {
self.realm_set_config(realm, config)?;
}
} else { } else {
return Err(Error::CreateRealmFailed); return Err(Error::CreateRealmFailed);
} }
Ok(()) Ok(())
} }
} }