Skip to content

Commit

Permalink
Final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkain committed Nov 3, 2023
1 parent e314a29 commit e4d3974
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void checkDataIntegrityException(DataIntegrityViolationException e, Acqu
@Override
public ResponseEntity<List<AcquisitionEquipmentDTO>> findAcquisitionEquipmentsBySerialNumber(
@Parameter(name = "serial number of the acquisition equipment", required = true) @PathVariable("serialNumber") final String serialNumber) {
List<AcquisitionEquipment> equipments = acquisitionEquipmentService.findAll();
List<AcquisitionEquipment> equipments = acquisitionEquipmentService.findAllBySerialNumber(serialNumber);
// Remove "unknown" equipment
equipments = equipments.stream().filter(equipment -> equipment.getId() != 0).collect(Collectors.toList());
if (equipments.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void createCenter() throws Exception {
}

@Test
public void createEquipmentAndFindIt() throws Exception {
public void createEquipmentAndFindBySerialNumber() throws Exception {
Center center = new Center();
center.setName("Center-Name-" + UUID.randomUUID().toString());
Center createdCenter = shUpClient.createCenter(center);
Expand Down

0 comments on commit e4d3974

Please sign in to comment.