Don't load associations for aliases

This commit is contained in:
byte[] 2021-12-29 19:56:25 -05:00
parent ede4b5ce4f
commit 46e68aac60

View file

@ -163,6 +163,7 @@ defmodule Philomena.Autocomplete do
@spec get_associations(tags_list()) :: assoc_map()
defp get_associations(tags) do
tags
|> Enum.filter(fn {_, _, _, aliased} -> is_nil(aliased) end)
|> Enum.map(fn {name, images_count, id, _} ->
# Randomly sample 100 images with this tag
image_sample =