Skip to content

Commit

Permalink
Merge pull request #106 from ttthanhf/hotfix/servicePage-analytic
Browse files Browse the repository at this point in the history
FIX - Add check null when get service by service name
  • Loading branch information
ttthanhf committed Nov 14, 2023
2 parents d21bf1b + 6291578 commit ff9acdc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/housemate/services/AnalyticService.java
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ public ResponseEntity<?> getAnalyticServicePage(HttpServletRequest request, Anal
analyticServicePageResponse.setTotalView(totalView);

Service service = serviceRepository.getServiceByFullNameService(serviceName);
if(service == null) {
continue;
}

int serviceId = service.getServiceId();

Image image = imageRepository.findFirstByEntityIdAndImageType(serviceId, ImageType.SERVICE).orElse(null);
Expand Down

0 comments on commit ff9acdc

Please sign in to comment.