danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 157 forks source link

Improve queryset when sending follow-up notifications #326

Closed danirus closed 3 years ago

danirus commented 3 years ago

As commented by @enzedonline here, the queryset used in the function notify_comment_followers could be improve using DISTINCT and falling back to the current query when the database does not support it, as is the case with sqlite.

aliceni81 commented 2 years ago

@danirus image I think the codes in the circle is duplicated as you use feed_followers function. Should it be removed?