From e03b40fc17cfdda483e66f8d8c1f461ec29689e6 Mon Sep 17 00:00:00 2001 From: salim ben ahben <40862545+Sben65@users.noreply.github.com> Date: Fri, 28 Jan 2022 16:02:54 +0100 Subject: [PATCH] fix #128 delete a model who got no image (#134) * fix #128 * fix #128 Co-authored-by: Kevin BEAUGRAND <9513635+kbeaugrand@users.noreply.github.com> --- .../Server/Managers/DeviceModelImageManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AzureIoTHub.Portal/Server/Managers/DeviceModelImageManager.cs b/src/AzureIoTHub.Portal/Server/Managers/DeviceModelImageManager.cs index 52f978f76..0990a223a 100644 --- a/src/AzureIoTHub.Portal/Server/Managers/DeviceModelImageManager.cs +++ b/src/AzureIoTHub.Portal/Server/Managers/DeviceModelImageManager.cs @@ -51,7 +51,7 @@ public async Task DeleteDeviceModelImageAsync(string deviceModelId) this.logger.LogInformation($"Deleting from Blob storage :\n\t {blobClient.Uri}\n"); - await blobClient.DeleteAsync(); + await blobClient.DeleteIfExistsAsync(); } public Uri ComputeImageUri(string deviceModelId)