class ProposePlaceServiceImpl implements ProposePlaceService {

    @Override
    public void savePhotosWithPlace(List<Photo> photos, Place place) {
        photos.forEach(photo -> {
            if (photoService.findByName(photo.getName()).isPresent()) {
                throw new BadRequestException(ErrorMessage.PHOTO_IS_PRESENT);
            }
            photo.setPlace(place);
        });
    }

}