From e122f1ffd382fbc1bc1ec0e7034f3fff3bea80b2 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Sat, 9 May 2020 03:41:22 +0200 Subject: [PATCH] fix bug causing NullPointerException in SavingsAccount (FINERACT-957) --- .../fineract/portfolio/savings/domain/SavingsAccount.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java index e55a654ec..178ae758e 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/domain/SavingsAccount.java @@ -1572,7 +1572,7 @@ public class SavingsAccount extends AbstractPersistableCustom { Long officeId = null; if (this.client != null) { officeId = this.client.officeId(); - } else { + } else if (this.group != null) { officeId = this.group.officeId(); } return officeId; @@ -1582,7 +1582,7 @@ public class SavingsAccount extends AbstractPersistableCustom { Office office = null; if (this.client != null) { office = this.client.getOffice(); - } else { + } else if (this.group != null) { office = this.group.getOffice(); } return office;