Skip to content

Commit

Permalink
feat: or-1972 do not try to find duplicates if no adres is given
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintenGreenstack committed Nov 21, 2023
1 parent 30c15ad commit 2876d56
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public SearchDuplicateVerenigingDetectionService(IElasticClient client)
public async Task<IReadOnlyCollection<DuplicaatVereniging>> GetDuplicates(VerenigingsNaam naam, Locatie[] locaties)
{
var locatiesMetAdres = locaties.Where(l => l.Adres is not null).ToArray();
if (locatiesMetAdres.Length == 0) return Array.Empty<DuplicaatVereniging>();

var postcodes = locatiesMetAdres.Select(l => l.Adres!.Postcode).ToArray();
var gemeentes = locatiesMetAdres.Select(l => l.Adres!.Gemeente).ToArray();

Expand Down

0 comments on commit 2876d56

Please sign in to comment.