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

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

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

sichen
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);