From 45bbb661743376e809ecd4dfc29b8be7bb38bc89 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Fri, 20 Dec 2024 15:11:37 +0000 Subject: [PATCH] Handle when no license type is set (#608) --- .../azure/vmagent/AzureVMManagementServiceDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java b/src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java index faefd3ca..1946654a 100644 --- a/src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java +++ b/src/main/java/com/microsoft/azure/vmagent/AzureVMManagementServiceDelegate.java @@ -732,7 +732,7 @@ public AzureVMDeploymentInfo createDeployment( putParameter(parameters, "authenticationType", "key"); } - if (!Constants.NO_LICENSE_TYPE.contains(template.getLicenseType())) { + if (template.getLicenseType() != null && !Constants.NO_LICENSE_TYPE.contains(template.getLicenseType())) { addLicenseType(tmp, template.getLicenseType()); }