Fixed how the enterprise configuration handles empty and invalid IDs (#1143)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-10-31 15:47:06 +01:00
1 parent 652d3a509f
commit 43d202310b
5 files changed
+401 -15

No files matched your search

@@ -218,8 +218,24 @@ public static partial class ManagedConfiguration
{
// Case: the read string is a Guid:
case Guid:
//
// An empty text selects nothing, which is also the default of these settings. This is
// how an organization locks a selection to none, e.g., to switch off transcription:
//
if (string.IsNullOrWhiteSpace(configuredText))
{
successful = true;
configuredValue = string.Empty;
break;
}
successful = Guid.TryParse(configuredText, out var id);
configuredValue = successful ? id.ToString().ToLowerInvariant() : configuredText;
// A dry run comes before the actual one, so only the actual one reports the text:
if (!successful && !dryRun)
Log.LogWarning($"The configuration plugin '{configPluginId}' sets '{configuredText}' for the setting '{configMeta.SettingName}', which is no valid ID. Ignoring it.");
break;
// Case: the read string is just a string: