ObligationAdmission account not active error message fix
This commit is contained in:
parent
097f0c649b
commit
4351fc9ca3
1 changed files with 2 additions and 2 deletions
|
|
@ -24,11 +24,11 @@ public class AccountActiveValidationRule implements IValidationRule<ImdgValidati
|
||||||
Registry validatedObject = context.getValidatedObject();
|
Registry validatedObject = context.getValidatedObject();
|
||||||
Imdg<Account> accImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
|
Imdg<Account> accImdg = context.obtainMap(IMDGDistributedNames.Map_Account, Account.class);
|
||||||
if (validatedObject.getAccountId() == null) {
|
if (validatedObject.getAccountId() == null) {
|
||||||
return of(ClearingError.AccountNotActive, validatedObject.getAccountId());
|
return of(ClearingError.AccountNotActive, validatedObject.getAccount());
|
||||||
}
|
}
|
||||||
Account account = accImdg.getSingleObjectByID(validatedObject.getAccountId());
|
Account account = accImdg.getSingleObjectByID(validatedObject.getAccountId());
|
||||||
if (account == null || (!IEnumKey.contains(account.getStatus(), ServiceStatus.Active, ServiceStatus.Reopened))) {
|
if (account == null || (!IEnumKey.contains(account.getStatus(), ServiceStatus.Active, ServiceStatus.Reopened))) {
|
||||||
return of(ClearingError.AccountNotActive, validatedObject.getAccountId());
|
return of(ClearingError.AccountNotActive, validatedObject.getAccount());
|
||||||
}
|
}
|
||||||
return empty();
|
return empty();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue