dev fix sort
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-04-24 12:54:48 +07:00
parent d2d78b5117
commit cdaa6c7ce2
2 changed files with 6 additions and 5 deletions
@@ -112,10 +112,10 @@ public class ViolationHandler implements RequestHandler {
);
} else {
violationPage = violationService.getViolationsByFiles(
targetFiles,
violationRequest.getPage(), violationRequest.getSize(), violationRequest.getSortDirection()
);
targetFiles, violationRequest.getPage(), violationRequest.getSize(),
violationRequest.getSortDirection());
}
ViolationResponse.ViolationDto firstShowViolation = null;
List<Violation> content = violationPage.getContent();
List<ViolationResponse.ViolationDto> violationDtos = new ArrayList<>();
@@ -129,7 +129,8 @@ public class ViolationHandler implements RequestHandler {
}
for (Violation violation : content) {
if (firstShowViolation != null && Objects.equals(firstShowViolation.getId(), violation.getId())) continue;
if (violation.getStatus().equals(ViolationStatus.NOT_OWNER_FILE.name()) ||
firstShowViolation != null && Objects.equals(firstShowViolation.getId(), violation.getId())) continue;
ViolationResponse.ViolationDto violationDto = ViolationResponse.ViolationDto.fromEntity(violation);
violationDto.setCountry(geoCountryService.getCountryName(violation.getPageUrl()));