We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8b9595 commit 403ed4fCopy full SHA for 403ed4f
webapp/ordering/models.py
@@ -5,6 +5,7 @@
5
from datetime import datetime
6
from decimal import Decimal, ROUND_UP, ROUND_DOWN
7
from django.db import models, transaction
8
+from django.db.models import Q
9
from django_extensions.db.models import TimeStampedModel
10
from django.core.exceptions import ValidationError
11
from accounts.models import Address, VokoUser
@@ -338,7 +339,10 @@ def _users_without_orders_filter(voko_user):
338
339
340
return list(
341
filter(
- _users_without_orders_filter, VokoUser.objects.filter(is_active=True)
342
+ _users_without_orders_filter,
343
+ VokoUser.objects.filter(Q(is_active=True)
344
+ (Q(userprofile__isnull=True)
345
+ | Q(userprofile__orderround_mail_optout=False)))
346
)
347
348
0 commit comments