Fix slightly broken logic
This commit is contained in:
parent
160fc47494
commit
ea70bfc65e
@ -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(())
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user