Login  Register

Small patch for ProductEvents.java

Posted by Scott Gray on Aug 13, 2006; 6:11am
URL: http://ofbiz.116.s1.nabble.com/Small-patch-for-ProductEvents-java-tp170629.html

Attached is a tiny patch for ProductEvents.java updateAttribute.  The
code is checking to see if productId is empty twice, instead of checking
productId and AttrName.

Regards
Scott

Index: applications/product/src/org/ofbiz/product/product/ProductEvents.java
===================================================================
--- applications/product/src/org/ofbiz/product/product/ProductEvents.java (revision 431144)
+++ applications/product/src/org/ofbiz/product/product/ProductEvents.java (working copy)
@@ -600,7 +600,7 @@
 
         if (!UtilValidate.isNotEmpty(productId))
             errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.product_ID_missing", UtilHttp.getLocale(request)));
-        if (!UtilValidate.isNotEmpty(productId))
+        if (!UtilValidate.isNotEmpty(attrName))
             errMsg += ("<li>" + UtilProperties.getMessage(resource,"productevents.attribute_name_missing", UtilHttp.getLocale(request)));
         if (errMsg.length() > 0) {
             errMsg += ("<b>" + UtilProperties.getMessage(resource,"productevents.following_errors_occurred", UtilHttp.getLocale(request)));