lihao 4 年之前
父節點
當前提交
4d621f719d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

+ 2 - 2
gx_api/GxPress/Service/GxPress.Service.Implement/Note/NoteService.cs

@@ -152,7 +152,7 @@ namespace GxPress.Service.Implement.Note
                     var middle = await _middleRepository.GetMiddleAsync(request.FolderId);
                     result.Id = noteId;
                     result.FolderId = request.FolderId;
-                    result.FolderName = middle.FolderName;
+                    result.FolderName = middle == null ? "" : middle.FolderName;
                     transactionScope.Complete();
                 }
             }
@@ -648,7 +648,7 @@ namespace GxPress.Service.Implement.Note
             {
                 Id = entity.Id,
                 FolderId = entity.FolderId,
-                FolderName = middleDto.FolderName
+                FolderName = middleDto == null ? "" : middleDto.FolderName
             };
             return result;
         }