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
|
defmodule Frenzy.UpdateFeeds do
|
||||||
use GenServer
|
use GenServer
|
||||||
alias Frenzy.{Repo, Feed, Item, FilterEngine}
|
alias Frenzy.{Repo, Feed, Item}
|
||||||
import Ecto.Query
|
import Ecto.Query
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
|
@ -70,10 +70,10 @@ defmodule Frenzy.UpdateFeeds do
|
||||||
status_code: 200,
|
status_code: 200,
|
||||||
body: body,
|
body: body,
|
||||||
headers: headers
|
headers: headers
|
||||||
}} = response ->
|
}} ->
|
||||||
{_, content_type} =
|
{_, content_type} =
|
||||||
headers
|
headers
|
||||||
|> Enum.find(fn {k, v} -> k == "Content-Type" end)
|
|> Enum.find(fn {k, _v} -> k == "Content-Type" end)
|
||||||
|
|
||||||
content_type =
|
content_type =
|
||||||
content_type
|
content_type
|
||||||
|
@ -183,7 +183,7 @@ defmodule Frenzy.UpdateFeeds do
|
||||||
:tombstone ->
|
:tombstone ->
|
||||||
changeset =
|
changeset =
|
||||||
Ecto.build_assoc(feed, :items, %{
|
Ecto.build_assoc(feed, :items, %{
|
||||||
guid: entry.id,
|
guid: item_params.guid,
|
||||||
tombstone: true
|
tombstone: true
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue