We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 14bf5a2 + b94afe5 commit 7b86af8Copy full SHA for 7b86af8
1 file changed
src/Commands/Common/Entity/Images/AddImageCommand.cs
@@ -57,7 +57,7 @@ public async Task InvokeAsync(string repo, string id, string imagePath, string?
57
Logger.LogInformation($" {nameof(imageFile.GetType)}: {imageFile.GetType()}");
58
59
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);
+ var addedImage = await entity.GetImageFilesAsync(cancellationToken).FirstAsync(x=> x.Id == (imageId ?? imageFile.Id) || x.Name == imageName, cancellationToken: cancellationToken);
61
Logger.LogInformation($"Added file:");
62
Logger.LogInformation($"- {nameof(addedImage.Id)}: {addedImage.Id}");
63
Logger.LogInformation($" {nameof(addedImage.Name)}: {addedImage.Name}");
0 commit comments