Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using the feed approval constants in a few more places.

  • Loading branch information...
commit 343b65318e49402ef3d00d434cbfd9a659754f70 1 parent 556b3cf
@justinabrahms justinabrahms authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 django_website/aggregator/models.py
View
4 django_website/aggregator/models.py
@@ -35,7 +35,7 @@ class Feed(models.Model):
feed_url = models.URLField(unique=True, max_length=500)
public_url = models.URLField(max_length=500)
is_defunct = models.BooleanField()
- approval_status = models.CharField(max_length=1, choices=STATUS_CHOICES, default=STATUS_CHOICES[0][0])
+ approval_status = models.CharField(max_length=1, choices=STATUS_CHOICES, default=PENDING_FEED)
feed_type = models.ForeignKey(FeedType)
owner = models.ForeignKey(User, blank=True, null=True, related_name='owned_feeds')
@@ -44,7 +44,7 @@ def __unicode__(self):
def save(self, **kwargs):
super(Feed, self).save(**kwargs)
- if settings.PRODUCTION and self.approval_status == STATUS_CHOICES[2][0]:
+ if settings.PRODUCTION and self.approval_status == APPROVED_FEED:
Subscription.objects.subscribe(self.feed_url, settings.PUSH_HUB)
def delete(self, **kwargs):
Please sign in to comment.
Something went wrong with that request. Please try again.