diff --git a/lib/algora/activities/activities.ex b/lib/algora/activities/activities.ex index 69ee56c6a..36423d76e 100644 --- a/lib/algora/activities/activities.ex +++ b/lib/algora/activities/activities.ex @@ -59,13 +59,13 @@ defmodule Algora.Activities do @tables Map.keys(@schema_from_table) @user_attributes Map.keys(@table_from_user_relation) - def schema_from_table(name) when is_binary(name), do: name |> String.to_atom() |> schema_from_table() + def schema_from_table(name) when is_binary(name), do: name |> String.to_existing_atom() |> schema_from_table() def schema_from_table(name) when is_atom(name) do Map.fetch!(@schema_from_table, name) end - def table_from_schema(name) when is_binary(name), do: name |> String.to_atom() |> table_from_schema() + def table_from_schema(name) when is_binary(name), do: name |> String.to_existing_atom() |> table_from_schema() def table_from_schema(name) when is_atom(name) do Map.fetch!(@table_from_schema, name)