Merge pull request #992 from Musoni/MIFOSX-1399
fix adding new guaraton to loan account having existing guarantor
This commit is contained in:
+1
-1
@@ -81,7 +81,7 @@ public class GuarantorWritePlatformServiceJpaRepositoryIImpl implements Guaranto
|
||||
final Long entityId = guarantorCommand.getEntityId();
|
||||
|
||||
for (final Guarantor guarantor : existGuarantorList) {
|
||||
if (guarantor.getLoanId() == loanId && guarantor.getEntityId() == entityId) {
|
||||
if (guarantor.getLoanId() == loanId && entityId !=null && guarantor.getEntityId() == entityId) {
|
||||
String defaultUserMessage = this.clientRepositoryWrapper.findOneWithNotFoundDetection(entityId).getDisplayName();
|
||||
defaultUserMessage = defaultUserMessage + " is already exist as a guarantor for this loan";
|
||||
final String action = loan.client() != null ? "client.guarantor" : "group.guarantor";
|
||||
|
||||
Reference in New Issue
Block a user