fix(backend): filter out nil tags before starting looking for existing ones
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
d5021647d7
commit
f04d2b9225
@ -26,7 +26,11 @@ defmodule Mobilizon.Federation.ActivityStream.Converter.Utils do
|
|||||||
Logger.debug("fetching tags")
|
Logger.debug("fetching tags")
|
||||||
Logger.debug(inspect(tags))
|
Logger.debug(inspect(tags))
|
||||||
|
|
||||||
tags |> Enum.flat_map(&fetch_tag/1) |> Enum.uniq() |> Enum.map(&existing_tag_or_data/1)
|
tags
|
||||||
|
|> Enum.flat_map(&fetch_tag/1)
|
||||||
|
|> Enum.uniq()
|
||||||
|
|> Enum.filter(& &1)
|
||||||
|
|> Enum.map(&existing_tag_or_data/1)
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_tags(_), do: []
|
def fetch_tags(_), do: []
|
||||||
|
Loading…
Reference in New Issue
Block a user