Skip to content

Commit

Permalink
Merge pull request #6983 from microsoft/endgame-202209
Browse files Browse the repository at this point in the history
Endgame 202209
  • Loading branch information
wangmingliang-ms authored Sep 30, 2022
2 parents ef97023 + 3ef1d28 commit 5bd1a9e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import com.microsoft.azure.toolkit.lib.appservice.model.Runtime;
import com.microsoft.azure.toolkit.lib.appservice.task.CreateOrUpdateFunctionAppTask;
import com.microsoft.azure.toolkit.lib.appservice.task.DeployFunctionAppTask;
import com.microsoft.azure.toolkit.lib.common.model.AzResource;
import com.microsoft.azure.toolkit.lib.resource.ResourceGroupConfig;
import org.apache.commons.lang3.StringUtils;

Expand Down Expand Up @@ -50,7 +51,11 @@ public FunctionAppConfig getFunctionAppConfigFromExistingFunction(@Nonnull final

public FunctionAppBase<?, ?, ?> createOrUpdateFunctionApp(final FunctionAppConfig config) {
final CreateOrUpdateFunctionAppTask task = new CreateOrUpdateFunctionAppTask(convertToTaskConfig(config));
return task.execute();
final FunctionAppBase<?, ?, ?> execute = task.execute();
if (execute instanceof AzResource.Draft) {
((AzResource.Draft<?, ?>) execute).reset();
}
return execute;
}

private com.microsoft.azure.toolkit.lib.appservice.config.FunctionAppConfig convertToTaskConfig(final FunctionAppConfig config) {
Expand Down

0 comments on commit 5bd1a9e

Please sign in to comment.