diff --git a/app_api/controllers/reviews.js b/app_api/controllers/reviews.js index 76468a4..9c76237 100644 --- a/app_api/controllers/reviews.js +++ b/app_api/controllers/reviews.js @@ -75,6 +75,9 @@ var doSetAverageRating = function(location) { } ratingAverage = parseInt(ratingTotal / reviewCount, 10); location.rating = ratingAverage; + }else{ + location.rating = 0 + } location.save(function(err) { if (err) { console.log(err);