diff --git a/openapi/src/main/java/fc/be/openapi/google/dto/review/APIRatingResponse.java b/openapi/src/main/java/fc/be/openapi/google/dto/review/APIRatingResponse.java index 600b5bc..888c1c8 100644 --- a/openapi/src/main/java/fc/be/openapi/google/dto/review/APIRatingResponse.java +++ b/openapi/src/main/java/fc/be/openapi/google/dto/review/APIRatingResponse.java @@ -13,8 +13,8 @@ public static APIRatingResponse convertToRatingResponse(GoogleRatingResponse goo } return new APIRatingResponse( - googleRatingResponse.rating(), - googleRatingResponse.reviews().size() + (googleRatingResponse.rating() == null) ? 0.0 : googleRatingResponse.rating(), + (googleRatingResponse.reviews() == null)? 0 : googleRatingResponse.reviews().size() ); } }