From e0d17394b8e46c89760a5932dabd3d215c9db581 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 25 Aug 2022 23:52:46 +0100 Subject: [PATCH] Don't index body on spotify pages This includes API data, of which there is a lot --- website/spotify/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/website/spotify/models.py b/website/spotify/models.py index fc131cc..8278e87 100644 --- a/website/spotify/models.py +++ b/website/spotify/models.py @@ -1,5 +1,6 @@ from datetime import timedelta from functools import cached_property +from unittest.mock import Base from django.core.cache import cache from django.core.exceptions import ValidationError @@ -30,6 +31,12 @@ class SpotifyPlaylistPage(BaseContentPage): if panel.field_name != "subtitle" ] + [FieldPanel("spotify_playlist_id")] + search_fields = [ + panel + for panel in BaseContentPage.search_fields + if panel.field_name not in ["body", "subtitle"] + ] + @property def table_of_contents(self) -> list: return []