Permalink
Browse files

don't update feeds with no last_updated (perhaps a little arbitrary)

  • Loading branch information...
1 parent 4a43704 commit 40913033c7977b3e394920acef3474174fe3fefe @sethwalker committed Nov 12, 2008
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/models/subscription.rb
@@ -43,6 +43,7 @@ def update!
existing_items = existing_reposts( fetched.map(&:url))
existing_urls = existing_items.map { |ex| ex.data.source_url }
updated_fetched, new_fetched = fetched.partition { |fe| existing_urls.include?( fe.url )}
+ updated_fetched = updated_fetched.select {|fe| !fe.last_updated.blank?}
reposts.create_from_feed new_fetched unless new_fetched.empty?
reposts.update_from_feed( updated_fetched, existing_items ) unless updated_fetched.empty?
update_attribute :last_updated_at, Time.now

0 comments on commit 4091303

Please sign in to comment.