Skip to content

Commit 8e0fe85

Browse files
committed
Fix configuration source in empty in slot creation dialog
1 parent 804905f commit 8e0fe85

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/ui/components/DeploymentSlotComboBox.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected List<ExtendableTextComponent.Extension> getExtensions() {
7070

7171
private void createResource() {
7272
final List<DeploymentSlotConfig> existingSlots = this.getItems().stream()
73-
.filter(config -> StringUtils.isNoneBlank(config.getConfigurationSource()))
73+
.filter(config -> !config.isNewCreate())
7474
.collect(Collectors.toList());
7575
final DeploymentSlotCreationDialog dialog = new DeploymentSlotCreationDialog(project, existingSlots);
7676
dialog.setOkActionListener(config -> {
@@ -92,7 +92,7 @@ protected List<? extends DeploymentSlotConfig> loadItems() throws Exception {
9292
return Collections.emptyList();
9393
}
9494
final List<DeploymentSlotConfig> result = module.list().stream().map(slot ->
95-
DeploymentSlotConfig.builder().name(slot.getName()).build()).collect(Collectors.toList());
95+
DeploymentSlotConfig.builder().name(slot.getName()).newCreate(false).build()).collect(Collectors.toList());
9696
this.draftItems.stream().filter(config -> !result.contains(config)).forEach(result::add);
9797
return result;
9898
}

PluginsAndFeatures/azure-toolkit-for-intellij/azure-intellij-plugin-appservice/src/main/java/com/microsoft/azure/toolkit/intellij/legacy/function/runner/deploy/ui/components/DeploymentSlotCreationDialog.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public DeploymentSlotConfig getValue() {
6969
return DeploymentSlotConfig.builder()
7070
.name(txtName.getValue())
7171
.configurationSource(source)
72+
.newCreate(true)
7273
.build();
7374
}
7475

0 commit comments

Comments
 (0)