Browse files

Delete subscriptions when deleting feeds.

  • Loading branch information...
1 parent 1a81666 commit de1cfb5c2ba54bbee01122a328e327cfc717415a @jacobian jacobian committed Jun 29, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 django_website/aggregator/models.py
View
4 django_website/aggregator/models.py
@@ -31,6 +31,10 @@ def save(self, **kwargs):
super(Feed, self).save(**kwargs)
Subscription.objects.subscribe(self.feed_url, settings.PUSH_HUB)
+ def delete(self, **kwargs):
+ super(Feed, self).delete(**kwargs)
+ Subscription.objects.unsubscribe(self.feed_url, settings.PUSH_HUB)
+
class FeedItemManager(models.Manager):
def create_or_update_by_guid(self, guid, **kwargs):
"""

0 comments on commit de1cfb5

Please sign in to comment.