lihao 4 years ago
parent
commit
4d621f719d

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