Commit a1e0d916a24db1511103a720e8e1bc3480649b1b
Exists in
master
and in
29 other branches
Merge branch 'ai3303' into 'stable'
Fix external feed parse with empty content http://noosfero.org/Development/ActionItem3303 See merge request !319
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
app/models/external_feed.rb
@@ -11,6 +11,7 @@ class ExternalFeed < ActiveRecord::Base | @@ -11,6 +11,7 @@ class ExternalFeed < ActiveRecord::Base | ||
11 | } | 11 | } |
12 | 12 | ||
13 | def add_item(title, link, date, content) | 13 | def add_item(title, link, date, content) |
14 | + return if content.blank? | ||
14 | doc = Hpricot(content) | 15 | doc = Hpricot(content) |
15 | doc.search('*').each do |p| | 16 | doc.search('*').each do |p| |
16 | if p.instance_of? Hpricot::Elem | 17 | if p.instance_of? Hpricot::Elem |