Fix error when sending never-updated feeds via Fever API

This commit is contained in:
Shadowfacts 2020-10-24 13:32:00 -04:00
parent a13b1d8181
commit 3bbf42df75
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
1 changed files with 2 additions and 1 deletions

View File

@ -11,7 +11,8 @@ defmodule Frenzy.Feed do
title: feed.title,
url: feed.feed_url,
site_url: feed.site_url,
last_updated_on_time: Timex.to_unix(feed.last_updated),
last_updated_on_time:
if(is_nil(feed.last_updated), do: 0, else: Timex.to_unix(feed.last_updated)),
is_spark: false
}
end