diff options
author | crupest <crupest@outlook.com> | 2020-08-11 01:16:56 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-11 01:16:56 +0800 |
commit | e02e1e120693d466679cae2b602085f57b60971f (patch) | |
tree | 4ef46f3861528b8b5287cc4a6912fb402dee57cd /Timeline/Services/TimelineService.cs | |
parent | 06e79c99bbc810f16058b35f1c88c23148bf8e57 (diff) | |
download | timeline-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.cs | 4 |
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;
|