라벨 다운로드 수정
This commit is contained in:
@@ -257,16 +257,16 @@ public class LabelAllocateCoreService {
|
||||
|
||||
// 파일이 있는지만 확인
|
||||
Path path = Paths.get(responsePath).resolve(dto.getLearnUid() + ".zip");
|
||||
if (!Files.isRegularFile(path)) return false; // exists 포함
|
||||
|
||||
if (!Files.exists(path) || !Files.isRegularFile(path)) {
|
||||
// 실제 파일만 true (디렉터리는 제외)
|
||||
return false;
|
||||
}
|
||||
String state = dto.getAnalState();
|
||||
boolean isLabelingIng =
|
||||
LabelMngState.ASSIGNED.getId().equals(state) || LabelMngState.ING.getId().equals(state);
|
||||
|
||||
// 다운로드 확인할 학습데이터가 라벨링중인 경우 파일 생성여부가 정상인지 확인
|
||||
if (dto.getAnalState().equals(LabelMngState.ASSIGNED.getId())
|
||||
|| dto.getAnalState().equals(LabelMngState.ING.getId())) {
|
||||
return batchStepHistoryRepository.isDownloadable(dto.getAnalId());
|
||||
if (isLabelingIng) {
|
||||
Long analId = dto.getAnalId();
|
||||
if (analId == null) return false;
|
||||
return batchStepHistoryRepository.isDownloadable(analId);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user