mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-24 04:27:59 +01:00
drop affected notifications instead of moving them to the target (unique constraint violation)
This commit is contained in:
parent
685159587c
commit
5e67e5aa14
1 changed files with 1 additions and 1 deletions
|
@ -734,7 +734,7 @@ defmodule Philomena.Images do
|
||||||
{count, nil} =
|
{count, nil} =
|
||||||
Notification
|
Notification
|
||||||
|> where(actor_type: "Image", actor_id: ^source.id)
|
|> where(actor_type: "Image", actor_id: ^source.id)
|
||||||
|> Repo.update_all(set: [actor_id: target.id])
|
|> Repo.delete_all()
|
||||||
|
|
||||||
{:ok, count}
|
{:ok, count}
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue