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<()> {
|
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(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user