Merge pull request #376 from vishwasbabu/bug-fix

make staff Id optional for client creation/updation
This commit is contained in:
Vishwas Babu A J
2013-06-18 23:29:39 -07:00
@@ -63,7 +63,7 @@ public final class ClientDataValidator {
if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.staffIdParamName, element)) {
final Long staffId = this.fromApiJsonHelper.extractLongNamed(ClientApiConstants.staffIdParamName, element);
baseDataValidator.reset().parameter(ClientApiConstants.staffIdParamName).value(staffId).notNull().longGreaterThanZero();
baseDataValidator.reset().parameter(ClientApiConstants.staffIdParamName).value(staffId).ignoreIfNull().longGreaterThanZero();
}
if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.accountNoParamName, element)) {
@@ -289,7 +289,7 @@ public final class ClientDataValidator {
if (this.fromApiJsonHelper.parameterExists(ClientApiConstants.staffIdParamName, element)) {
final Long staffId = this.fromApiJsonHelper.extractLongNamed(ClientApiConstants.staffIdParamName, element);
baseDataValidator.reset().parameter(ClientApiConstants.staffIdParamName).value(staffId).notNull().longGreaterThanZero();
baseDataValidator.reset().parameter(ClientApiConstants.staffIdParamName).value(staffId).ignoreIfNull().longGreaterThanZero();
}
if (!atLeastOneParameterPassedForUpdate) {