Fix getting categories from global search engine

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2022-10-12 18:27:26 +02:00
parent 76ff11ceae
commit c051e26380
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773

View File

@ -187,7 +187,7 @@ defmodule Mobilizon.Service.GlobalSearch.SearchMobilizon do
ends_on: parse_date(data["endTime"]), ends_on: parse_date(data["endTime"]),
url: data["url"], url: data["url"],
picture: picture, picture: picture,
category: String.to_existing_atom(Categories.get_category(data["category"])), category: data["category"] |> Categories.get_category() |> String.downcase() |> String.to_existing_atom(),
organizer_actor: %Actor{ organizer_actor: %Actor{
id: data["creator"]["id"], id: data["creator"]["id"],
name: data["creator"]["displayName"], name: data["creator"]["displayName"],