Skip to content

Commit

Permalink
fix cover config failed when import config
Browse files Browse the repository at this point in the history
  • Loading branch information
lepdou committed Sep 11, 2021
1 parent 16acb77 commit fd8854c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void importConfigByZipWithIgnoreConflictNamespace(@RequestParam(value = "

byte[] bytes = file.getBytes();
try (ZipInputStream zipInputStream = new ZipInputStream(new ByteArrayInputStream(bytes))) {
configsImportService.importDataFromZipFile(importEnvs, zipInputStream, false);
configsImportService.importDataFromZipFile(importEnvs, zipInputStream, true);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ private void importItems(String appId, Env env, String clusterName, String names
newItem.setDataChangeLastModifiedTime(new Date());

try {
itemService.loadItem(env, appId, clusterName, namespaceName, key);
ItemDTO oldItem = itemService.loadItem(env, appId, clusterName, namespaceName, key);
newItem.setId(oldItem.getId());
//existed
itemService.updateItem(appId, env, clusterName, namespaceName, newItem);
} catch (Exception e) {
Expand Down

0 comments on commit fd8854c

Please sign in to comment.