If the ingest comes in with zero supported language, do not make any changes, specifically removals.
All checks were successful
ci / build-test (push) Successful in 2m23s
ci / publish-image (push) Successful in 1m37s

This commit is contained in:
2026-03-30 23:22:50 -04:00
parent adfbf654a6
commit 347f6f297d

View File

@@ -426,6 +426,9 @@ public class VoiceWorkUpdater(AppDbContext dbContext, ITimeProvider timeProvider
VoiceWork voiceWork = upsertContext.VoiceWorks[ingest.ProductId]; VoiceWork voiceWork = upsertContext.VoiceWorks[ingest.ProductId];
Dictionary<string, VoiceWorkSupportedLanguage> existingLanguageLinks = voiceWork.SupportedLanguages.ToDictionary(x => x.Language); Dictionary<string, VoiceWorkSupportedLanguage> existingLanguageLinks = voiceWork.SupportedLanguages.ToDictionary(x => x.Language);
if (ingest.SupportedLanguages.Count == 0)
return;
foreach (SupportedLanguage supportedLanguage in ingest.SupportedLanguages) foreach (SupportedLanguage supportedLanguage in ingest.SupportedLanguages)
{ {
if (!existingLanguageLinks.TryGetValue(supportedLanguage.Code, out VoiceWorkSupportedLanguage? voiceWorkSupportedLanguage)) if (!existingLanguageLinks.TryGetValue(supportedLanguage.Code, out VoiceWorkSupportedLanguage? voiceWorkSupportedLanguage))