Skip to content

Commit

Permalink
Return null if missing
Browse files Browse the repository at this point in the history
  • Loading branch information
angrave committed Jan 19, 2024
1 parent f908576 commit 7e35718
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ClassTranscribeServer/Controllers/MediaController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public async Task<ActionResult<MediaDTO>> GetMedia(string id)
{
var media = await _context.Medias.
Include(m => m.Video).ThenInclude(v => v.Transcriptions).
Where(m => m.Id == id).FirstAsync();
Where(m => m.Id == id).FirstOrDefaultAsync();

if (media == null)
{
Expand Down

0 comments on commit 7e35718

Please sign in to comment.