Fix NPE if statusId is not passed to service.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@782530 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Anil Patel
2009-06-08 05:35:18 +00:00
parent 6432ba5a1f
commit f329bb33aa
@@ -306,7 +306,7 @@ public class PartyServices {
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) {