diff --git a/src/OrganisationRegistry.ElasticSearch.Projections/Organisations/Organisation.cs b/src/OrganisationRegistry.ElasticSearch.Projections/Organisations/Organisation.cs index 8633665ad..bccad45eb 100644 --- a/src/OrganisationRegistry.ElasticSearch.Projections/Organisations/Organisation.cs +++ b/src/OrganisationRegistry.ElasticSearch.Projections/Organisations/Organisation.cs @@ -117,6 +117,8 @@ public async Task Handle( document.Name = message.Body.NameBeforeKboCoupling; document.ShortName = message.Body.ShortNameBeforeKboCoupling; + document.LegalEntityType = null; + document.KboNumber = string.Empty; } ).ToAsyncResult(); diff --git a/test/OrganisationRegistry.ElasticSearch.Tests/OrganisationHandlerTests.cs b/test/OrganisationRegistry.ElasticSearch.Tests/OrganisationHandlerTests.cs index 2924eca44..6657f19e5 100644 --- a/test/OrganisationRegistry.ElasticSearch.Tests/OrganisationHandlerTests.cs +++ b/test/OrganisationRegistry.ElasticSearch.Tests/OrganisationHandlerTests.cs @@ -310,6 +310,7 @@ await _eventProcessor.Handle( organisation.Source.Validity.Start.Should().Be(organisationCreated.ValidFrom); organisation.Source.KboNumber.Should().Be(coupledWithKbo.KboNumber); organisation.Source.Validity.End.Should().Be(organisationValidity); + organisation.Source.LegalEntityType.Should().BeNull(); } [Fact]