aboutsummaryrefslogtreecommitdiff
path: root/Timeline/Services/TimelineService.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-08-11 01:16:56 +0800
committercrupest <crupest@outlook.com>2020-08-11 01:16:56 +0800
commitd31cc920403b1e1f90a48d2569084c2f6a4d7dbe (patch)
treefcb379996d02a1de4052f6598d7c52e1196b35a7 /Timeline/Services/TimelineService.cs
parentd529b53530270cd7c5d9a90ebcb11e49f7b1eb0d (diff)
downloadtimeline-d31cc920403b1e1f90a48d2569084c2f6a4d7dbe.tar.gz
timeline-d31cc920403b1e1f90a48d2569084c2f6a4d7dbe.tar.bz2
timeline-d31cc920403b1e1f90a48d2569084c2f6a4d7dbe.zip
Make author column of post nullable.
Diffstat (limited to 'Timeline/Services/TimelineService.cs')
-rw-r--r--Timeline/Services/TimelineService.cs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Timeline/Services/TimelineService.cs b/Timeline/Services/TimelineService.cs
index eafb0088..ad410d15 100644
--- a/Timeline/Services/TimelineService.cs
+++ b/Timeline/Services/TimelineService.cs
@@ -413,9 +413,7 @@ namespace Timeline.Services
private async Task<TimelinePost> MapTimelinePostFromEntity(TimelinePostEntity entity, string timelineName)
{
-
-
- var author = await _userService.GetUserById(entity.AuthorId);
+ User? author = entity.AuthorId.HasValue ? await _userService.GetUserById(entity.AuthorId.Value) : null;
ITimelinePostContent? content = null;