diff --git a/realm-config-ui/src/realmsd.rs b/realm-config-ui/src/realmsd.rs index 921712e..1f14b4e 100644 --- a/realm-config-ui/src/realmsd.rs +++ b/realm-config-ui/src/realmsd.rs @@ -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() { - self.realm_set_config(realm, config)?; + if self.create_realm(realm)? { + if !config.is_empty() { + self.realm_set_config(realm, config)?; + } } else { return Err(Error::CreateRealmFailed); } - Ok(()) } }