Skip to content

Commit

Permalink
Update api/api/controllers/search_controller.py
Browse files Browse the repository at this point in the history
Co-authored-by: sarayourfriend <24264157+sarayourfriend@users.noreply.github.com>
  • Loading branch information
obulat and sarayourfriend authored Nov 22, 2023
1 parent 09a1fc4 commit 96a41e0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/api/controllers/search_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ def get_excluded_providers_query() -> Q | None:

filtered_providers = cache.get(key=FILTERED_PROVIDERS_CACHE_KEY)
if not filtered_providers:
providers = models.ContentProvider.objects.filter(filter_content=True).values(
"provider_identifier"
)
filtered_providers = [p["provider_identifier"] for p in providers]
filtered_providers = list(models.ContentProvider.objects.filter(filter_content=True).values_list(
"provider_identifier",
flat=True,
))
cache.set(
key=FILTERED_PROVIDERS_CACHE_KEY,
timeout=FILTER_CACHE_TIMEOUT,
Expand Down

0 comments on commit 96a41e0

Please sign in to comment.