Skip to content

Commit ce91529

Browse files
Improved enterprise IT checks when run without such an environment (#494)
1 parent 6979a73 commit ce91529

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Download.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ public static partial class PluginFactory
77
{
88
public static async Task<EntityTagHeaderValue?> DetermineConfigPluginETagAsync(Guid configPlugId, string configServerUrl, CancellationToken cancellationToken = default)
99
{
10+
if(configPlugId == Guid.Empty || string.IsNullOrWhiteSpace(configServerUrl))
11+
return null;
12+
1013
try
1114
{
1215
var serverUrl = configServerUrl.EndsWith('/') ? configServerUrl[..^1] : configServerUrl;

app/MindWork AI Studio/Tools/Services/EnterpriseEnvironmentService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@ private async Task StartUpdating(bool isFirstRun = false)
5454
switch (enterpriseConfigServerUrl)
5555
{
5656
case null when enterpriseConfigId == Guid.Empty:
57+
case not null when string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
5758
logger.LogInformation("AI Studio runs without an enterprise configuration.");
5859
break;
5960

6061
case null:
6162
logger.LogWarning($"AI Studio runs with an enterprise configuration id ('{enterpriseConfigId}'), but the configuration server URL is not set.");
6263
break;
6364

64-
case not null when enterpriseConfigId == Guid.Empty:
65+
case not null when !string.IsNullOrWhiteSpace(enterpriseConfigServerUrl) && enterpriseConfigId == Guid.Empty:
6566
logger.LogWarning($"AI Studio runs with an enterprise configuration server URL ('{enterpriseConfigServerUrl}'), but the configuration ID is not set.");
6667
break;
6768

0 commit comments

Comments
 (0)