You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by si...@apache.org on 2006/09/13 20:50:40 UTC

svn commit: r443071 - /incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

Author: sichen
Date: Wed Sep 13 11:50:39 2006
New Revision: 443071

URL: http://svn.apache.org/viewvc?view=rev&rev=443071
Log:
Fixed a small bug in getPreviousNextProducts service where if the product is not in the category, it will return an error, instead of just gracefully exiting

Modified:
    incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java

Modified: incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java?view=diff&rev=443071&r1=443070&r2=443071
==============================================================================
--- incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java (original)
+++ incubator/ofbiz/trunk/applications/product/src/org/ofbiz/product/category/CategoryServices.java Wed Sep 13 11:50:39 2006
@@ -97,7 +97,8 @@
 
         Collection memberCol = (Collection) values.get("categoryMembers");
         if (memberCol == null || memberCol.size() == 0) {
-            return ServiceUtil.returnError("Problem reading category member data.");
+            // this is not going to be an error condition because we don't want it to be so critical, ie rolling back the transaction and such
+            return ServiceUtil.returnSuccess("Product not found in the current category.");
         }
 
         List memberList = new ArrayList(memberCol);