From 057dd4715a994a2d7529d684095e93d8fc366447 Mon Sep 17 00:00:00 2001 From: Michael Hoennig Date: Tue, 14 Jan 2025 17:12:01 +0100 Subject: [PATCH] remove gate for debitor.partner == null - should not happen anymore --- .../hs/office/debitor/HsOfficeDebitorController.java | 4 +--- .../hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorController.java b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorController.java index 78b8082d..6b7dc93e 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorController.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorController.java @@ -222,8 +222,6 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi { final BiConsumer ENTITY_TO_RESOURCE_POSTMAPPER = (entity, resource) -> { resource.setDebitorNumber(entity.getTaggedDebitorNumber()); - if (resource.getPartner() != null) { // FIXME: should not happen - resource.getPartner().setPartnerNumber(entity.getPartner().getTaggedPartnerNumber()); - } + resource.getPartner().setPartnerNumber(entity.getPartner().getTaggedPartnerNumber()); }; } diff --git a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java index 8fc5c0f6..4e20fbf8 100644 --- a/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java +++ b/src/main/java/net/hostsharing/hsadminng/hs/office/debitor/HsOfficeDebitorEntity.java @@ -131,9 +131,7 @@ public class HsOfficeDebitorEntity implements BaseEntity, @Override public HsOfficeDebitorEntity load() { BaseEntity.super.load(); - if (partner != null) { // FIXME: should not happen - partner.load(); - } + partner.load(); debitorRel.load(); if (refundBankAccount != null) { refundBankAccount.load();