fix : Correct Defect

This commit is contained in:
Suphonchai Phoonsawat 2024-07-10 20:20:37 +07:00
parent 99027059c5
commit fec199cdd9
3 changed files with 12 additions and 9 deletions

View file

@ -190,7 +190,8 @@ namespace BMA.EHR.Leave.Service.Controllers
var doc = await _minIOService.UploadFileAsync(d);
if (doc != null)
{
leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
var a = leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
_context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
}
}
@ -417,7 +418,8 @@ namespace BMA.EHR.Leave.Service.Controllers
var doc = await _minIOService.UploadFileAsync(d);
if (doc != null)
{
leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
var a = leaveRequest.LeaveDocument.Add(new LeaveDocument { Document = doc });
_context.Entry(a).State = Microsoft.EntityFrameworkCore.EntityState.Modified;
}
}
}