FIX: check for blank response when polling feed

This commit is contained in:
Arpit Jalan 2018-05-18 16:59:40 +05:30
parent 2fecb4b46e
commit 9512796ef6
1 changed files with 2 additions and 1 deletions

View File

@ -87,8 +87,9 @@ module Jobs
private
def parsed_feed
raw_feed = fetch_rss.encode("UTF-8", invalid: :replace, undef: :replace, replace: "")
raw_feed = fetch_rss
return nil if raw_feed.blank?
raw_feed.encode!("UTF-8", invalid: :replace, undef: :replace, replace: "")
if SiteSetting.embed_username_key_from_feed.present?
FeedElementInstaller.install(SiteSetting.embed_username_key_from_feed, raw_feed)