Skip to content

Commit

Permalink
- Fix issue #456
Browse files Browse the repository at this point in the history
  • Loading branch information
rathnapandi committed Oct 8, 2024
1 parent 747a0d8 commit d90f270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public List<Map<String, String>> getApplications() {
for (ClientApplication app : actualAPIProxy.getApplications()) {
Map<String, String> applications = new HashMap<>();
applications.put("name", app.getName());
applications.put("organization", app.getOrganization().getName());
exportApps.add(applications);
}
return exportApps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ private void completeClientApplications(API apiConfig) throws AppException {
while (it.hasNext()) {
app = it.next();
if (app.getName() != null) {
ClientAppFilter filter = new ClientAppFilter.Builder().hasName(app.getName()).build();
ClientAppFilter.Builder builder = new ClientAppFilter.Builder().hasName(app.getName());
if (app.getOrganization() != null)
builder.hasOrganizationName(app.getOrganization().getName());
ClientAppFilter filter = builder.build();
loadedApp = APIManagerAdapter.getInstance().getAppAdapter().getApplication(filter);
if (loadedApp == null) {
LOG.warn("Unknown application with name: {} configured. Ignoring this application.", filter.getApplicationName());
Expand All @@ -398,7 +401,7 @@ private void completeClientApplications(API apiConfig) throws AppException {
it.remove();
continue;
}
LOG.info("Found existing application: {} ({}) based on given name {}", app.getName(), app.getId(), app.getName());
LOG.info("Application exists : {} ({})]", app.getName(), app.getId());
} else if (app.getApiKey() != null) {
loadedApp = getAppForCredential(app.getApiKey(), APIManagerAdapter.CREDENTIAL_TYPE_API_KEY);
if (loadedApp == null) {
Expand Down

0 comments on commit d90f270

Please sign in to comment.