Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Hotfix remove legacy application name uniquness (#3924)
Browse files Browse the repository at this point in the history
* Implementation

* Enhance logs for debugging

* e2e test fix
  • Loading branch information
alextargov authored Jun 28, 2024
1 parent c548cd5 commit 598cbbe
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 444 deletions.
10 changes: 0 additions & 10 deletions components/director/internal/domain/application/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -1177,17 +1177,7 @@ func (s *service) genericCreate(ctx context.Context, in model.ApplicationRegiste
}
log.C(ctx).Debugf("Loaded Application Tenant %s from context", appTenant)

applications, err := s.appRepo.ListAll(ctx, appTenant)
if err != nil {
return "", err
}

normalizedName := s.appNameNormalizer.Normalize(in.Name)
for _, app := range applications {
if normalizedName == s.appNameNormalizer.Normalize(app.Name) && in.SystemNumber == app.SystemNumber {
return "", apperrors.NewNotUniqueNameError(resource.Application)
}
}

exists, err := s.ensureIntSysExists(ctx, in.IntegrationSystemID)
if err != nil {
Expand Down
Loading

0 comments on commit 598cbbe

Please sign in to comment.