diff options
Diffstat (limited to 'forum/management/commands')
-rw-r--r-- | forum/management/commands/send_email_alerts.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/forum/management/commands/send_email_alerts.py b/forum/management/commands/send_email_alerts.py index 563aab69..4a636e87 100644 --- a/forum/management/commands/send_email_alerts.py +++ b/forum/management/commands/send_email_alerts.py @@ -41,11 +41,11 @@ class Command(NoArgsCommand): #todo: still need to add back individually selected and other questions.... #these may be filtered out by tags if user.tag_filter_setting == 'ignored': - ignored_tags = user.markedtag_set.filter(reason='bad').values_list('tag', flat=True).distinct() + ignored_tags = Tag.objects.filter(user_selections___reason='bad',user_selections__user=user) Q_set1 = Q_set1.exclude( tags__in=ignored_tags ) logging.debug('removed ignored tags') else: - selected_tags = user.markedtag_set.filter(reason='good').values_list('tag', flat=True).distinct() + selected_tags = Tag.objects.filter(user_selections___reason='good',user_selections__user=user) Q_set1 = Q_set1.filter( tags__in=selected_tags ) logging.debug('filtered for only selected tags') |