Skip to content

Commit

Permalink
Merge pull request #9 from PharmEasyEngg/fix/comp-error
Browse files Browse the repository at this point in the history
error
  • Loading branch information
sarathpharmeasy authored Dec 23, 2022
2 parents 9e9e3d7 + 6e882a7 commit d436c00
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 61 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.lampo.device_lab.master.model.DeviceStatusModel;
import com.lampo.device_lab.master.model.HeldBy;
import com.lampo.device_lab.master.model.ModelDevice;
import com.lampo.device_lab.master.model.Photo;
import com.lampo.device_lab.master.repos.IDeviceRepository;
import com.lampo.device_lab.master.repos.IDeviceStatusRepository;
import com.lampo.device_lab.master.repos.ITeamRepository;
Expand Down Expand Up @@ -217,7 +218,8 @@ private String getDeviceType(@NonNull Device device) {
private String getPhoneImage(@NonNull Device device) {
String name = (device.getDeviceInformation().isAndroid() ? device.getDeviceInformation().getMarketName()
: device.getDeviceInformation().getModel()).replaceAll("[\\(\\)]", " ");
return phoneImageService.getPhotoByName(name).stream().findFirst().orElseGet(() -> "default");
return phoneImageService.getPhotoByName(name).stream().map(Photo::getName).findFirst()
.orElseGet(() -> "default");
}

private String getUrl(@NonNull Device device, String clientIp) {
Expand Down Expand Up @@ -286,4 +288,4 @@ private String getDisplayName(@NonNull Device device) {
.collect(Collectors.toList());
}

}
}

This file was deleted.

0 comments on commit d436c00

Please sign in to comment.