diff --git a/lib/outlook/public.ex b/lib/outlook/public.ex index 5157c7c..3b1474e 100644 --- a/lib/outlook/public.ex +++ b/lib/outlook/public.ex @@ -28,7 +28,7 @@ implement to_param protocol (no more needed for Outlook.Translations.Translation where: t.public == true and t.language == ^language, order_by: [desc: t.date] Repo.all(q) - |> Enum.map(fn rec -> Enum.into(rec, %{}) end) + # |> Enum.map(fn rec -> Enum.into(rec, %{}) end) |> Enum.map(fn map -> struct(Artikel, map) end) end @@ -50,7 +50,7 @@ implement to_param protocol (no more needed for Outlook.Translations.Translation where: t.id == ^id and t.public == true case Repo.one(q) do nil -> {:error, "Artikel does not exist, or isn't public."} - artikel -> {:ok, struct(Artikel, artikel |> Enum.into(%{}))} + artikel -> {:ok, struct(Artikel, artikel)} end end