Fix crash caused filter tombstone-ing an item
This commit is contained in:
parent
6a30b57ca4
commit
9e6b185cfd
|
@ -1,6 +1,6 @@
|
|||
defmodule Frenzy.UpdateFeeds do
|
||||
use GenServer
|
||||
alias Frenzy.{Repo, Feed, Item, FilterEngine}
|
||||
alias Frenzy.{Repo, Feed, Item}
|
||||
import Ecto.Query
|
||||
require Logger
|
||||
|
||||
|
@ -70,10 +70,10 @@ defmodule Frenzy.UpdateFeeds do
|
|||
status_code: 200,
|
||||
body: body,
|
||||
headers: headers
|
||||
}} = response ->
|
||||
}} ->
|
||||
{_, content_type} =
|
||||
headers
|
||||
|> Enum.find(fn {k, v} -> k == "Content-Type" end)
|
||||
|> Enum.find(fn {k, _v} -> k == "Content-Type" end)
|
||||
|
||||
content_type =
|
||||
content_type
|
||||
|
@ -183,7 +183,7 @@ defmodule Frenzy.UpdateFeeds do
|
|||
:tombstone ->
|
||||
changeset =
|
||||
Ecto.build_assoc(feed, :items, %{
|
||||
guid: entry.id,
|
||||
guid: item_params.guid,
|
||||
tombstone: true
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue