Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Google Cloud Translation Provider/GoogleAPI/V3Connector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public async Task<List<CombinedModel>> GetV3TranslationModelsAsync()
var jsonResponse = await response.Content.ReadAsStringAsync();
var modelsResponse = JsonConvert.DeserializeObject<TranslationModelsResponse>(jsonResponse);

return modelsResponse.Models;
return modelsResponse.Models ?? [];
}

_logger.Error($"Error: {response.StatusCode} - {await response.Content.ReadAsStringAsync()}");
Expand Down Expand Up @@ -280,7 +280,7 @@ public async Task<List<CombinedModel>> GetProjectCustomModels()

// Add V3 translation models while checking for duplicates
var v3Models = await GetV3TranslationModelsAsync();

foreach (var model in v3Models)
{
var existingModel = combinedModels.FirstOrDefault(a =>
Expand Down
Loading