Handle side_articles with not enough recents
Side articles make an IndexError when there is not enough recents. [#](https://sparcs.slack.com/archives/CV6H8N4EM/p1631709944000600?thread_ts=1630331076.011200&cid=CV6H8N4EM)

diff --git a/apps/core/serializers/article.py b/apps/core/serializers/article.py
index 3f0c149..3e525a7 100644
--- a/apps/core/serializers/article.py
+++ b/apps/core/serializers/article.py
@@ -268,17 +268,19 @@ class ArticleSerializer(BaseArticleSerializer):
         }
 
     def get_side_articles_of_recent_article(self, obj, request):
-        article_read_log_set = obj.article_read_log_set.all()
+        article_user_read_log_set = obj.article_read_log_set.filter(
+            read_by=request.user,
+        ).order_by('-created_at')
+
+        # abort if there is not enough recent articles
+        if article_user_read_log_set.count() <= 1:
+            return None, None
 
         # 현재 ArticleReadLog
-        curr_read_log_of_obj = article_read_log_set.filter(
-            read_by=request.user,
-        ).order_by('-created_at')[0]
+        curr_read_log_of_obj = article_user_read_log_set[0]
 
         # 직전 ArticleReadLog
-        last_read_log_of_obj = article_read_log_set.filter(
-            read_by=request.user,
-        ).order_by('-created_at')[1]
+        last_read_log_of_obj = article_user_read_log_set[1]
 
         # 특정 글의 마지막 ArticleReadLog 를 찾기 위한 Subquery
         last_read_log_of_article = ArticleReadLog.objects.filter(
diff --git a/tests/test_recent.py b/tests/test_recent.py
index 7c5fd77..72695b2 100644
--- a/tests/test_recent.py
+++ b/tests/test_recent.py
@@ -233,3 +233,9 @@ class TestRecent(TestCase, RequestSetting):
         assert resp['side_articles']['before']['id'] == before_id
         assert resp['side_articles']['after']['id'] == after_id
 
+    # 첫 번째 읽기가 from_view=recent일 경우 테스트
+    def test_read_first_article_from_recent(self):
+
+        resp = self.http_request(self.user, 'get', f'articles/{self.articles[2].id}', querystring='from_view=recent').data
+        assert resp['side_articles']['before'] is None
+        assert resp['side_articles']['after'] is None
['tests/test_recent.py', 'apps/core/serializers/article.py']