Skip to content

Commit

Permalink
feat: use kbo number prop on org
Browse files Browse the repository at this point in the history
  • Loading branch information
koenmetsu authored and CumpsD committed Mar 10, 2020
1 parent bbfad04 commit fdf0b5b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/OrganisationRegistry.Api/Kbo/KboController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ public async Task<IActionResult> Get(
var digitsOnly = kboNumber.ToDigitsOnly();

if (await context
.OrganisationKeyList
.AnyAsync(x =>
x.KeyTypeId == _apiConfiguration.KBO_KeyTypeId &&
(x.KeyValue.Equals(dotFormat) || x.KeyValue.Equals(digitsOnly))))
.OrganisationDetail
.AnyAsync(x => x.KboNumber.Equals(dotFormat) || x.KboNumber.Equals(digitsOnly)))
{
ModelState.AddModelError(
key: "Duplicate",
Expand Down

0 comments on commit fdf0b5b

Please sign in to comment.