diff options
| author | rinpatch <rinpatch@sdf.org> | 2019-04-29 21:25:30 +0300 | 
|---|---|---|
| committer | rinpatch <rinpatch@sdf.org> | 2019-04-29 21:25:30 +0300 | 
| commit | f8f6af4cc1e9389023c04dba0984f523704f11b1 (patch) | |
| tree | 58a6083309fd8cf7d15fcac288360b0c053f1d3f /priv/repo/migrations | |
| parent | 41d78f91083b5017e6085150bfae71a842f5c47f (diff) | |
| download | pleroma-f8f6af4cc1e9389023c04dba0984f523704f11b1.tar.gz pleroma-f8f6af4cc1e9389023c04dba0984f523704f11b1.zip | |
Fix MigrateOldBookmarks migration crashing on deleted activities
Diffstat (limited to 'priv/repo/migrations')
| -rw-r--r-- | priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs | 2 | 
1 files changed, 1 insertions, 1 deletions
| diff --git a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs index ebe69696e..134b7c6f7 100644 --- a/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs +++ b/priv/repo/migrations/20190414125034_migrate_old_bookmarks.exs @@ -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) | 
