Commit 32a4501d authored by rinpatch's avatar rinpatch

Merge branch 'hotfix/migrateoldbookmarks-crashing-on-deleted-activities' into 'develop'

Fix MigrateOldBookmarks migration crashing on deleted activities

See merge request pleroma/pleroma!1106
parents 41d78f91 f8f6af4c
......@@ -18,7 +18,7 @@ defmodule Pleroma.Repo.Migrations.MigrateOldBookmarks do
|> Enum.each(fn %{id: user_id, bookmarks: bookmarks} ->
Enum.each(bookmarks, fn ap_id ->
activity = Activity.get_create_by_object_ap_id(ap_id)
{:ok, _} = Bookmark.create(user_id, activity.id)
unless is_nil(activity), do: {:ok, _} = Bookmark.create(user_id, activity.id)
end)
end)
......
Markdown is supported
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