aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2012-03-10 14:03:28 +0100
committerGravatar Tom Willemsen2012-03-10 14:03:28 +0100
commiteddb9cbef7fa9aba198d6e11ea018b09f3e877af (patch)
tree062c8273d44d145b7c7e43496968cd202eb011ca
parent63d1ed7d192e2e17665add4f70dca10c2681d704 (diff)
downloadryuslash.org-eddb9cbef7fa9aba198d6e11ea018b09f3e877af.tar.gz
ryuslash.org-eddb9cbef7fa9aba198d6e11ea018b09f3e877af.zip
Always make sure a feed's updated value is correct
-rw-r--r--aggregator/management/commands/load_feeds.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/aggregator/management/commands/load_feeds.py b/aggregator/management/commands/load_feeds.py
index c143052..3f698e4 100644
--- a/aggregator/management/commands/load_feeds.py
+++ b/aggregator/management/commands/load_feeds.py
@@ -32,6 +32,8 @@ class Command(BaseCommand):
updated=updated,
feed=feed)
post.save()
- feed.updated = datetime.datetime.now()
+ last_updated = Post.objects.filter(feed=feed)\
+ .order_by('-updated')[0].updated
+ feed.updated = last_updated
feed.save()