Apply suggestion to lib/pleroma/delivery.ex

This commit is contained in:
rinpatch 2019-09-13 15:23:26 +00:00
parent 2784962dba
commit 05f8a066a1

View File

@ -31,7 +31,7 @@ defmodule Pleroma.Delivery do
def create(object_id, user_id) do def create(object_id, user_id) do
%Delivery{} %Delivery{}
|> changeset(%{user_id: user_id, object_id: object_id}) |> changeset(%{user_id: user_id, object_id: object_id})
|> Repo.insert() |> Repo.insert(on_conflict: :nothing)
end end
def get(object_id, user_id) do def get(object_id, user_id) do