diff --git a/src/main/java/com/rbkmoney/orgmanager/converter/BouncerContextConverter.java b/src/main/java/com/rbkmoney/orgmanager/converter/BouncerContextConverter.java index 772e9c1..690ac49 100644 --- a/src/main/java/com/rbkmoney/orgmanager/converter/BouncerContextConverter.java +++ b/src/main/java/com/rbkmoney/orgmanager/converter/BouncerContextConverter.java @@ -30,6 +30,7 @@ public class BouncerContextConverter { return new Organization() .setId(entity.getId()) .setOwner(new Entity().setId(entity.getOwner())) + .setParty(new Entity().setId(entity.getId())) .setRoles(CollectionUtils.isEmpty(roles) ? null : roles.stream() .filter(memberRoleEntity -> memberRoleEntity.getOrganizationId().equals(entity.getId())) diff --git a/src/test/java/com/rbkmoney/orgmanager/converter/BouncerContextConverterTest.java b/src/test/java/com/rbkmoney/orgmanager/converter/BouncerContextConverterTest.java index 9900379..e453ab0 100644 --- a/src/test/java/com/rbkmoney/orgmanager/converter/BouncerContextConverterTest.java +++ b/src/test/java/com/rbkmoney/orgmanager/converter/BouncerContextConverterTest.java @@ -81,6 +81,7 @@ class BouncerContextConverterTest { assertEquals(organizationEntity.getId(), organization.getId()); assertEquals(organizationEntity.getOwner(), organization.getOwner().getId()); + assertEquals(organizationEntity.getId(), organization.getParty().getId()); assertTrue(organization.getRoles().isEmpty()); } @@ -94,6 +95,7 @@ class BouncerContextConverterTest { assertEquals(organizationEntity.getId(), organization.getId()); assertEquals(organizationEntity.getOwner(), organization.getOwner().getId()); + assertEquals(organizationEntity.getId(), organization.getParty().getId()); assertEquals(memberRoleEntity.getRoleId(), organization.getRoles().iterator().next().getId()); }