If the ingest comes in with zero supported language, do not make any changes, specifically removals.
This commit is contained in:
@@ -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))
|
||||||
|
|||||||
Reference in New Issue
Block a user