Commit 3cb51827 authored by lain's avatar lain
Browse files

Remove superfluous transaction.

parent f169de34
......@@ -316,16 +316,13 @@ defp make_date do
end
def context_to_conversation_id(context) do
{:ok, id} = Repo.transaction(fn ->
with %Object{id: id} <- Object.get_cached_by_ap_id(context) do
id
else _e ->
changeset = Object.context_mapping(context)
{:ok, %{id: id}} = Repo.insert(changeset)
id
end
end)
id
with %Object{id: id} <- Object.get_cached_by_ap_id(context) do
id
else _e ->
changeset = Object.context_mapping(context)
{:ok, %{id: id}} = Repo.insert(changeset)
id
end
end
def conversation_id_to_context(id) do
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment