Update by natay on Wed Jun 19 12:10:22 EDT 2019 from Admins-MacBook-Air.local
@@ -43,6 +43,11 @@ def finalize_post(sender, instance, created, **kwargs):
lastedit_date=instance.lastedit_date)
# Get newly created subscriptions
+ # Additional context for the message.
+ extra_context = dict(post=instance)
+ new_subs = Subscription.objects.filter(date__gte=instance.lastedit_date, post=instance.root)
+ tasks.notify_followers.spool(subs=new_subs, author=instance.author, extra_context=extra_context)
+
print(Subscription.objects.filter(date__gte=instance.lastedit_date, post=instance.root))
1/0
if created:
@@ -122,7 +127,5 @@ def finalize_post(sender, instance, created, **kwargs):
# Get all users subscribed to root post, excluding current post author.
subs = Subscription.objects.filter(post=instance.root).exclude(Q(type=Subscription.NO_MESSAGES)
| Q(user=instance.user))
- # Additional context for the message.
- extra_context = dict(post=instance)
tasks.notify_followers.spool(subs=subs, author=instance.author, extra_context=extra_context)
