Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil-Nandagopal committed Aug 21, 2020
2 parents 28ea547 + 87f27c9 commit b184197
Show file tree
Hide file tree
Showing 2 changed files with 4,282 additions and 1,504 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,10 @@ public void examplesOrganization(MongoTemplate mongoTemplate, EncryptionService
for (final Map<String, Object> datasource : datasources) {
datasource.put("pluginId", plugins.get(datasource.remove("$pluginPackageName")));
final Map authentication = (Map) ((Map) datasource.get("datasourceConfiguration")).get("authentication");
final String plainPassword = (String) authentication.get("password");
authentication.put("password", encryptionService.encryptString(plainPassword));
if (authentication != null) {
final String plainPassword = (String) authentication.get("password");
authentication.put("password", encryptionService.encryptString(plainPassword));
}
datasource.put(FieldName.ORGANIZATION_ID, organizationId);
datasource.put(FieldName.CREATED_AT, Instant.now());
final Map<String, Object> insertedDatasource = mongoTemplate.insert(datasource, mongoTemplate.getCollectionName(Datasource.class));
Expand Down
Loading

0 comments on commit b184197

Please sign in to comment.