svn commit: r1040797 - /ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1040797 - /ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

doogie-3
Author: doogie
Date: Tue Nov 30 22:03:34 2010
New Revision: 1040797

URL: http://svn.apache.org/viewvc?rev=1040797&view=rev
Log:
The poster of a review(UserLogin) may not have a party attached, so
protect against a NPE.

Modified:
    ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl

Modified: ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl?rev=1040797&r1=1040796&r2=1040797&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl (original)
+++ ofbiz/trunk/applications/product/webapp/catalog/reviews/pendingReviews.ftl Tue Nov 30 22:03:34 2010
@@ -58,6 +58,7 @@ under the License.
                 <#list pendingReviews as review>
                 <#if review.userLoginId?has_content>
                 <#assign postedUserLogin = review.getRelatedOne("UserLogin")>
+                <#if postedUserLogin.partyId?has_content>
                 <#assign party = postedUserLogin.getRelatedOne("Party")>
                 <#assign partyTypeId = party.get("partyTypeId")>
                 <#if partyTypeId == "PERSON">
@@ -66,6 +67,7 @@ under the License.
                     <#assign postedPerson = postedUserLogin.getRelatedOne("PartyGroup")>
                 </#if>
                 </#if>
+                </#if>
                   <tr id="review_tableRow_${rowCount}" valign="middle"<#if rowClass == "1"> class="alternate-row"</#if>>
                       <td>
                           <input type="hidden" name="productReviewId_o_${rowCount}" value="${review.productReviewId}" />