mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Another fix for premium sub activation.
This commit is contained in:
parent
cb495b12f4
commit
87e1cca9c2
1 changed files with 11 additions and 11 deletions
|
@ -171,8 +171,8 @@ class Profile(models.Model):
|
|||
self.user.save()
|
||||
|
||||
# Only auto-enable every feed if a free user is moving to premium
|
||||
subs = UserSubscription.objects.filter(user=self.user)
|
||||
if not was_premium:
|
||||
subs = UserSubscription.objects.filter(user=self.user)
|
||||
for sub in subs:
|
||||
if sub.active: continue
|
||||
sub.active = True
|
||||
|
@ -180,16 +180,16 @@ class Profile(models.Model):
|
|||
sub.save()
|
||||
except (IntegrityError, Feed.DoesNotExist):
|
||||
pass
|
||||
|
||||
try:
|
||||
scheduled_feeds = [sub.feed.pk for sub in subs]
|
||||
except Feed.DoesNotExist:
|
||||
scheduled_feeds = []
|
||||
logging.user(self.user, "~SN~FMTasking the scheduling immediate premium setup of ~SB%s~SN feeds..." %
|
||||
len(scheduled_feeds))
|
||||
SchedulePremiumSetup.apply_async(kwargs=dict(feed_ids=scheduled_feeds))
|
||||
|
||||
UserSubscription.queue_new_feeds(self.user)
|
||||
|
||||
try:
|
||||
scheduled_feeds = [sub.feed.pk for sub in subs]
|
||||
except Feed.DoesNotExist:
|
||||
scheduled_feeds = []
|
||||
logging.user(self.user, "~SN~FMTasking the scheduling immediate premium setup of ~SB%s~SN feeds..." %
|
||||
len(scheduled_feeds))
|
||||
SchedulePremiumSetup.apply_async(kwargs=dict(feed_ids=scheduled_feeds))
|
||||
|
||||
UserSubscription.queue_new_feeds(self.user)
|
||||
|
||||
self.setup_premium_history()
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue