Skip to content

Commit

Permalink
Fix #596 - corpus must have a language
Browse files Browse the repository at this point in the history
  • Loading branch information
johnml1135 committed Jan 9, 2025
1 parent 44c432b commit e1b218b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ private async Task AuthorizeAsync(string id, CancellationToken cancellationToken

private async Task<Corpus> MapAsync(CorpusConfigDto corpusConfig, string id, CancellationToken cancellationToken)
{
if (corpusConfig.Language == null || corpusConfig.Language.Length == 0)
throw new InvalidOperationException("Corpus must have a language.");
return new Corpus
{
Id = id,
Expand Down

0 comments on commit e1b218b

Please sign in to comment.