Skip to content

Commit

Permalink
Fix up part of speech creation in AutoFaker
Browse files Browse the repository at this point in the history
  • Loading branch information
rmunn committed Jan 8, 2025
1 parent c678628 commit 9608493
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ public static async Task<Entry> EntryReadyForCreation(this AutoFaker autoFaker,
foreach (var sense in entry.Senses)
{
sense.EntryId = entry.Id;
if (sense.PartOfSpeechId.HasValue && sense.PartOfSpeech is null)
if (sense.PartOfSpeech is not null)
{
sense.PartOfSpeechId = sense.PartOfSpeech.Id;
}
else if (sense.PartOfSpeechId.HasValue)
{
var pos = new PartOfSpeech()
{
Expand Down

0 comments on commit 9608493

Please sign in to comment.