From ea70bfc65e74615ccbca40bbedcc47d4cf3931af Mon Sep 17 00:00:00 2001 From: Bruce Leidl Date: Mon, 29 Nov 2021 16:18:11 -0500 Subject: [PATCH] Fix slightly broken logic --- realm-config-ui/src/realmsd.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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(()) } }