fix: 修正file为空捕获
This commit is contained in:
@@ -38,7 +38,7 @@ namespace Yi.Framework.Rbac.Application.Services
|
||||
public async Task<IActionResult> Get([FromRoute] Guid code, [FromRoute] bool? isThumbnail)
|
||||
{
|
||||
var file = await _repository.GetAsync(x => x.Id == code);
|
||||
var path = file.GetQueryFileSavePath(isThumbnail);
|
||||
var path = file?.GetQueryFileSavePath(isThumbnail);
|
||||
if (path is null || !File.Exists(path))
|
||||
{
|
||||
return new NotFoundResult();
|
||||
|
||||
Reference in New Issue
Block a user