修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
ae38c84ef7
commit
9e4cf1d1db
|
@ -215,7 +215,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (!attachment.Path.Contains(attachment.DoctorId.ToString()))
|
||||
{
|
||||
var attachmentData= await _attachmentrepository.FirstOrDefaultAsync(a => a.Id == attachment.Id);
|
||||
var attachmentData= await _attachmentrepository.Where(a => a.Id == attachment.Id).FirstNotNullAsync();
|
||||
|
||||
var fileName= attachmentData.Path.Split("/").Last();
|
||||
|
||||
|
@ -228,7 +228,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
if (attachment.DoctorId != null)
|
||||
{
|
||||
await _attachmentrepository.DeleteFromQueryAsync(a => a.DoctorId == attachment.DoctorId && a.Type == attachment.Type);
|
||||
await _attachmentrepository.DeleteFromQueryAsync(a =>a.Id!=attachment.Id&& a.DoctorId == attachment.DoctorId && a.Type == attachment.Type);
|
||||
}
|
||||
|
||||
attachment.UpdateTime = DateTime.Now;
|
||||
|
|
Loading…
Reference in New Issue