diff --git a/apps/core/management/scripts/portal_crawler.py b/apps/core/management/scripts/portal_crawler.py index dd527a1b..bdf7ee5d 100644 --- a/apps/core/management/scripts/portal_crawler.py +++ b/apps/core/management/scripts/portal_crawler.py @@ -111,6 +111,9 @@ def _get_new_url_and_save_to_s3(url, session): hash = enc.hexdigest()[:20] filename = f'files/portal_image_{hash}.{url.split("_")[-1]}' + if url.startswith("/board"): + url = str(BASE_URL) + url + r = session.get(url, stream=True, cookies=COOKIES) if r.status_code == 200: s3 = boto3.client("s3") diff --git a/apps/core/migrations/0057_alter_article_name_type_and_more.py b/apps/core/migrations/0057_alter_article_name_type_and_more.py index d23bfcbf..d5e0c5b8 100644 --- a/apps/core/migrations/0057_alter_article_name_type_and_more.py +++ b/apps/core/migrations/0057_alter_article_name_type_and_more.py @@ -20,11 +20,4 @@ class Migration(migrations.Migration): verbose_name="익명 혹은 실명 여부", ), ), - migrations.AddIndex( - model_name="article", - index=models.Index( - fields=["created_at", "parent_board_id"], - name="created_at_parent_board_id_idx", - ), - ), ] diff --git a/apps/core/models/article.py b/apps/core/models/article.py index f2928574..25f4b529 100644 --- a/apps/core/models/article.py +++ b/apps/core/models/article.py @@ -172,13 +172,6 @@ class Meta(MetaDataModel.Meta): verbose_name = "게시물" verbose_name_plural = "게시물 목록" - indexes = [ - models.Index( - fields=["created_at", "parent_board_id"], - name="created_at_parent_board_id_idx", - ) - ] - def __str__(self): return self.title