forked from AkkomaGang/akkoma
Remove superfluous transaction.
This commit is contained in:
parent
f169de3454
commit
3cb518270a
1 changed files with 7 additions and 10 deletions
|
@ -316,7 +316,6 @@ 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 ->
|
||||
|
@ -324,8 +323,6 @@ def context_to_conversation_id(context) do
|
|||
{:ok, %{id: id}} = Repo.insert(changeset)
|
||||
id
|
||||
end
|
||||
end)
|
||||
id
|
||||
end
|
||||
|
||||
def conversation_id_to_context(id) do
|
||||
|
|
Loading…
Reference in a new issue