mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CA-380718: Ensure language code is passed when running PerfmonOptionsDefinitionAction
`SelectedValue` is always `null` because of the use of `ToStringWrapper` Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
parent
3afaff18f8
commit
fc868f5a5f
@ -222,8 +222,8 @@ namespace XenAdmin.SettingsPanels
|
||||
mailDestination = EmailAddressTextBox.Text;
|
||||
mailHub = SmtpServerAddrTextBox.Text + ":" + SmtpServerPortTextBox.Text;
|
||||
|
||||
if (MailLanguageComboBox.Visible && MailLanguageComboBox.SelectedValue != null)
|
||||
mailLangCode = MailLanguageComboBox.SelectedValue.ToString();
|
||||
if (MailLanguageComboBox.Visible && MailLanguageComboBox.SelectedItem is ToStringWrapper<string> stringWrapper && !string.IsNullOrEmpty(stringWrapper.item))
|
||||
mailLangCode = stringWrapper.item;
|
||||
}
|
||||
|
||||
return new PerfmonOptionsDefinitionAction(_XenModelObject.Connection, mailDestination, mailHub, mailLangCode, true);
|
||||
|
Loading…
Reference in New Issue
Block a user