Add two new/updated apps for self-hosted (#392)
* Add two new/updated apps for self-hosted * Fix potential NPE when template org dump has API datasources
This commit is contained in:
parent
9933464d1f
commit
87f27c9182
|
|
@ -704,8 +704,10 @@ public class DatabaseChangelog {
|
|||
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));
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user