Author: hansbak
Date: Thu Feb 22 21:00:14 2007
New Revision: 510827
URL:
http://svn.apache.org/viewvc?view=rev&rev=510827Log:
fix NPE
Modified:
ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh
Modified: ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh?view=diff&rev=510827&r1=510826&r2=510827==============================================================================
--- ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh (original)
+++ ofbiz/trunk/applications/order/webapp/ordermgr/WEB-INF/actions/requirement/ApprovedProductRequirements.bsh Thu Feb 22 21:00:14 2007
@@ -20,6 +20,8 @@
import org.ofbiz.base.util.UtilMisc;
prepare = dispatcher.runSync("prepareFind", UtilMisc.toMap("inputFields", parameters, "entityName", "Requirement"));
-results = dispatcher.runSync("getRequirementsForSupplier", UtilMisc.toMap("requirementConditions", prepare.get("entityConditionList"), "partyId", parameters.get("partyId")));
-context.put("requirementsForSupplier", results.get("requirementsForSupplier"));
-context.put("quantityReport", UtilMisc.toMap("distinctProductCount", results.get("distinctProductCount"), "quantityTotal", results.get("quantityTotal")));
+if (prepare.get("entityConditionList") != null) {
+ results = dispatcher.runSync("getRequirementsForSupplier", UtilMisc.toMap("requirementConditions", prepare.get("entityConditionList"), "partyId", parameters.get("partyId")));
+ context.put("requirementsForSupplier", results.get("requirementsForSupplier"));
+ context.put("quantityReport", UtilMisc.toMap("distinctProductCount", results.get("distinctProductCount"), "quantityTotal", results.get("quantityTotal")));
+}