Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Made content take precedence over anything else"

This reverts commit a1143bf.
  • Loading branch information...
commit 67d4a1dcf3a648237176752624a23519a46aeb32 1 parent acba0a4
@jezdez jezdez authored
Showing with 5 additions and 10 deletions.
  1. +5 −10 django_website/aggregator/models.py
View
15 django_website/aggregator/models.py
@@ -124,19 +124,14 @@ def feed_updated(sender, notification, **kwargs):
log.error("Feed ID %s has an entry ('%s') without a link or guid. Skipping.", feed.id, title)
link = getattr(entry, "link", guid)
- content = u''
if hasattr(entry, "summary"):
content = entry.summary
-
- if hasattr(entry, "description"):
+ elif hasattr(entry, "content"):
+ content = entry.content[0].value
+ elif hasattr(entry, "description"):
content = entry.description
-
- # 'content' takes precedence on anything else. 'summary' and
- # 'description' are usually truncated so it's safe to overwrite them
- if hasattr(entry, "content"):
- content = u''
- for item in entry.content:
- content += item.value
+ else:
+ content = u""
if 'published_parsed' in entry and entry.published_parsed is not None:
date_modified = datetime.datetime(*entry.published_parsed[:6])
Please sign in to comment.
Something went wrong with that request. Please try again.