Fix feed favicon_url not setting

This commit is contained in:
Shadowfacts 2020-06-01 22:45:47 -04:00
parent 5da980aef4
commit 5087ef0395
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 6 additions and 2 deletions

View File

@ -25,8 +25,12 @@ defmodule Frenzy.Task.FetchFavicon do
with %Feed{favicon_url: old_url} when old_url != favicon_url <- feed,
{:ok, favicon_data} <- fetch_favicon_data(favicon_url) do
IO.inspect(favicon_url)
changeset = Feed.changeset(feed, %{favicon: favicon_data, favicon_url: favicon_url})
changeset =
Feed.changeset(feed, %{
favicon: favicon_data,
favicon_url: to_string(favicon_url)
})
{:ok, _feed} = Repo.update(changeset)
else
_ ->