form
This commit is contained in:
parent
7fc9eef637
commit
b80372b367
@ -99,7 +99,11 @@ namespace InternshipSystem.Api.Controllers
|
||||
.Include(i => i.Documentation)
|
||||
.FirstAsync(i => i.Student.Id == user.PersonNumber, cancellationToken);
|
||||
|
||||
var document = internship.Documentation.First(d => d.Id == documentId);
|
||||
var document = await _context.Entry(internship)
|
||||
.Collection(i => i.Documentation)
|
||||
.Query()
|
||||
.Include(d => d.Scan)
|
||||
.FirstAsync(d => d.Id == documentId, cancellationToken);
|
||||
|
||||
document.Scan ??= new DocumentScan();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user