remove gate for debitor.partner == null - should not happen anymore

This commit is contained in:
Michael Hoennig 2025-01-14 17:12:01 +01:00
parent 70b12bba58
commit 057dd4715a
2 changed files with 2 additions and 6 deletions

View File

@ -222,8 +222,6 @@ public class HsOfficeDebitorController implements HsOfficeDebitorsApi {
final BiConsumer<HsOfficeDebitorEntity, HsOfficeDebitorResource> ENTITY_TO_RESOURCE_POSTMAPPER = (entity, resource) -> { final BiConsumer<HsOfficeDebitorEntity, HsOfficeDebitorResource> ENTITY_TO_RESOURCE_POSTMAPPER = (entity, resource) -> {
resource.setDebitorNumber(entity.getTaggedDebitorNumber()); resource.setDebitorNumber(entity.getTaggedDebitorNumber());
if (resource.getPartner() != null) { // FIXME: should not happen resource.getPartner().setPartnerNumber(entity.getPartner().getTaggedPartnerNumber());
resource.getPartner().setPartnerNumber(entity.getPartner().getTaggedPartnerNumber());
}
}; };
} }

View File

@ -131,9 +131,7 @@ public class HsOfficeDebitorEntity implements BaseEntity<HsOfficeDebitorEntity>,
@Override @Override
public HsOfficeDebitorEntity load() { public HsOfficeDebitorEntity load() {
BaseEntity.super.load(); BaseEntity.super.load();
if (partner != null) { // FIXME: should not happen partner.load();
partner.load();
}
debitorRel.load(); debitorRel.load();
if (refundBankAccount != null) { if (refundBankAccount != null) {
refundBankAccount.load(); refundBankAccount.load();