svn commit: r782530 - /ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java

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

svn commit: r782530 - /ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java

apatel-2
Author: apatel
Date: Mon Jun  8 05:35:18 2009
New Revision: 782530

URL: http://svn.apache.org/viewvc?rev=782530&view=rev
Log:
Fix NPE if statusId is not passed to service.

Modified:
    ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java

Modified: ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java?rev=782530&r1=782529&r2=782530&view=diff
==============================================================================
--- ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java (original)
+++ ofbiz/trunk/applications/party/src/org/ofbiz/party/party/PartyServices.java Mon Jun  8 05:35:18 2009
@@ -306,7 +306,7 @@
             return ServiceUtil.returnError(UtilProperties.getMessage(resource, "person.update.write_failure", new Object[] { e.getMessage() }, locale));
         }
         
-        if (!context.get("statusId").equals(oldStatusId)) {
+        if (UtilValidate.isNotEmpty(context.get("statusId")) && !context.get("statusId").equals(oldStatusId)) {
             try {
                 dispatcher.runSync("setPartyStatus", UtilMisc.toMap("partyId", partyId, "statusId", context.get("statusId"), "userLogin", context.get("userLogin")));
             } catch (GenericServiceException e) {