From c413a73eebdb41b1085bc690d30a475b9da1316e Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 9 May 2013 21:18:16 +0200 Subject: Leave title blank for posts without title --- ryuslash/aggregator/management/commands/loadfeeds.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'ryuslash/aggregator/management/commands/loadfeeds.py') diff --git a/ryuslash/aggregator/management/commands/loadfeeds.py b/ryuslash/aggregator/management/commands/loadfeeds.py index f826312..5663653 100644 --- a/ryuslash/aggregator/management/commands/loadfeeds.py +++ b/ryuslash/aggregator/management/commands/loadfeeds.py @@ -87,13 +87,15 @@ class Command(BaseCommand): if feedoptions.get('nl2br'): content = re.sub('\n', '
\n', content) - post = Post(post_id=entry.id, - title=entry.title, - category=feedoptions['category'], - link=entry.link, - updated=updated, - icon=icon, - content=content) + post = Post( + post_id=entry.id, + title=entry.title if feedoptions.get('title') else '', + category=feedoptions['category'], + link=entry.link, + updated=updated, + icon=icon, + content=content + ) post.save() newcount += 1 -- cgit v1.2.3-54-g00ecf