diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 216cbcca9..351bcf4e3 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1102,10 +1102,12 @@ namespace IRaCIS.Core.Application.Image.QA await _scpStudyRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, u => new SCPStudy() { SubjectVisitId = null }); + if (fisrtPath.IsNotNullOrEmpty()) + { + var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1); - var prefix = fisrtPath.Substring(1, fisrtPath.LastIndexOf('/') - 1); - - await _oSSService.DeleteFromPrefix(prefix, true); + await _oSSService.DeleteFromPrefix(prefix, true); + } }