diff options
author | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-07-20 13:03:34 +0300 |
---|---|---|
committer | Ivan Tashkinov <ivantashkinov@gmail.com> | 2019-07-20 13:03:34 +0300 |
commit | d0198fe215a7542ce506e40e1e4860a27ee2d01e (patch) | |
tree | 59cc360b361d205c2b8117236f3560775d6c71d8 /lib/pleroma/user.ex | |
parent | 93df0796f05eff382301de91fb268bb4bc3c3379 (diff) | |
download | pleroma-d0198fe215a7542ce506e40e1e4860a27ee2d01e.tar.gz |
[#1112] Preserving `id` on user insert conflict on order not to violate conversation_partipations_user_id_fkey constraint.
Diffstat (limited to 'lib/pleroma/user.ex')
-rw-r--r-- | lib/pleroma/user.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index c91fbb68a..5ea2b518b 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -1211,7 +1211,7 @@ defmodule Pleroma.User do data |> Map.put(:name, blank?(data[:name]) || data[:nickname]) |> remote_user_creation() - |> Repo.insert(on_conflict: :replace_all, conflict_target: :nickname) + |> Repo.insert(on_conflict: :replace_all_except_primary_key, conflict_target: :nickname) |> set_cache() end |