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
commite02e1e120693d466679cae2b602085f57b60971f (patch)
tree4ef46f3861528b8b5287cc4a6912fb402dee57cd /Timeline/Services/TimelineService.cs
parent06e79c99bbc810f16058b35f1c88c23148bf8e57 (diff)
downloadtimeline-e02e1e120693d466679cae2b602085f57b60971f.tar.gz
timeline-e02e1e120693d466679cae2b602085f57b60971f.tar.bz2
timeline-e02e1e120693d466679cae2b602085f57b60971f.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;