Skip to content

Commit

Permalink
fix: Using existing Transmission or Activity IDs should no longer res…
Browse files Browse the repository at this point in the history
…ult in internal server error on updates (#980)

#981
  • Loading branch information
oskogstad authored Aug 9, 2024
1 parent 04e1541 commit 0757b33
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ private async Task AppendActivity(DialogEntity dialog, UpdateDialogDto dto, Canc
_domainContext.AddError(
nameof(UpdateDialogDto.Activities),
$"Entity '{nameof(DialogActivity)}' with the following key(s) already exists: ({string.Join(", ", existingIds)}).");
return;
}

dialog.Activities.AddRange(newDialogActivities);
Expand Down Expand Up @@ -288,6 +289,7 @@ private async Task AppendTransmission(DialogEntity dialog, UpdateDialogDto dto,
_domainContext.AddError(
nameof(UpdateDialogDto.Transmissions),
$"Entity '{nameof(DialogTransmission)}' with the following key(s) already exists: ({string.Join(", ", existingIds)}).");
return;
}

dialog.Transmissions.AddRange(newDialogTransmissions);
Expand Down

0 comments on commit 0757b33

Please sign in to comment.