Fixed bug that was causing products with pending approval reviews (but no already approved reviews) to get 0 customer rating (for example in the advanced search sorted by average rating).

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@662406 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jacopo Cappellato
2008-06-02 12:01:51 +00:00
parent bcfde5726a
commit cf99d92b7a
@@ -585,8 +585,10 @@ under the License.
<field field-name="delegator" type="org.ofbiz.entity.GenericDelegator"/>
<field field-name="productId" type="java.lang.String"/>
</call-class-method>
<log level="info" message="Got new average customer rating ${product.averageCustomerRating}"/>
<log level="info" message="Got new average customer rating ${averageCustomerRating}"/>
<if-compare field-name="averageCustomerRating" operator="equals" value="0" type="Double">
<return/>
</if-compare>
<!-- update the review average on the ProductCalculatedInfo entity -->
<entity-one entity-name="ProductCalculatedInfo" value-name="productCalculatedInfo"/>
<if-empty field-name="productCalculatedInfo">