Skip to content

Commit 7b86af8

Browse files
authored
Merge pull request #2 from WindowsAppCommunity/fix/add-image-from-local-path
Fix adding images using local path
2 parents 14bf5a2 + b94afe5 commit 7b86af8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Commands/Common/Entity/Images/AddImageCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public async Task InvokeAsync(string repo, string id, string imagePath, string?
5757
Logger.LogInformation($" {nameof(imageFile.GetType)}: {imageFile.GetType()}");
5858

5959
await entity.AddImageAsync(imageFile, imageId ?? imageFile.Id, imageName, cancellationToken);
60-
var addedImage = await entity.GetImageFilesAsync(cancellationToken).FirstAsync(x=> x.Id == imageId || x.Name == imageName, cancellationToken: cancellationToken);
60+
var addedImage = await entity.GetImageFilesAsync(cancellationToken).FirstAsync(x=> x.Id == (imageId ?? imageFile.Id) || x.Name == imageName, cancellationToken: cancellationToken);
6161
Logger.LogInformation($"Added file:");
6262
Logger.LogInformation($"- {nameof(addedImage.Id)}: {addedImage.Id}");
6363
Logger.LogInformation($" {nameof(addedImage.Name)}: {addedImage.Name}");

0 commit comments

Comments
 (0)