Skip to content

Commit 7e35718

Browse files
committed
Return null if missing
1 parent f908576 commit 7e35718

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ClassTranscribeServer/Controllers/MediaController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public async Task<ActionResult<MediaDTO>> GetMedia(string id)
4242
{
4343
var media = await _context.Medias.
4444
Include(m => m.Video).ThenInclude(v => v.Transcriptions).
45-
Where(m => m.Id == id).FirstAsync();
45+
Where(m => m.Id == id).FirstOrDefaultAsync();
4646

4747
if (media == null)
4848
{

0 commit comments

Comments
 (0)