Skip to content

Commit

Permalink
fix(backoffice): remove isremoved validation when detaching address
Browse files Browse the repository at this point in the history
GAWR-6746
  • Loading branch information
ArneD committed Jan 24, 2025
1 parent 79c065c commit 28c5f63
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public DetachAddressRequestValidator(ConsumerAddressContext addressContext)
RuleFor(x => x.AdresId)
.Must(adresId =>
OsloPuriValidator.TryParseIdentifier(adresId, out var id)
|| int.TryParse(id, out var persistentLocalId))
|| int.TryParse(id, out _))
.DependentRules(() =>
{
RuleFor(x => x.AdresId)
Expand All @@ -25,7 +25,7 @@ public DetachAddressRequestValidator(ConsumerAddressContext addressContext)
var addressPersistentLocalId = OsloPuriValidatorExtensions.ParsePersistentLocalId(adresId);

var address = addressContext.GetOptional(new AddressPersistentLocalId(addressPersistentLocalId));
return address is not null && !address.Value.IsRemoved;
return address is not null; //&& !address.Value.IsRemoved; GAWR-6746
})
.WithErrorCode(ValidationErrors.Common.AdresIdInvalid.Code)
.WithMessage(ValidationErrors.Common.AdresIdInvalid.Message);
Expand Down

0 comments on commit 28c5f63

Please sign in to comment.