agree create 3

This commit is contained in:
H.T. Kruitbosch 2018-05-04 17:35:39 +02:00
parent 05b97556c2
commit fc7629edad

View File

@ -29,8 +29,8 @@ def gdpr_ask_agreement(request):
for user in User.objects.filter(
is_active=True).all():
if PendingGDPRAgree(user=user).exists() or GDPRAgreed(user=user).exists() or user.email is None \
or user.email == '':
if PendingGDPRAgree(user=user).objects.filterexists() or GDPRAgreed.objects.filter(user=user).exists() \
or user.email is None or user.email == '':
continue
token = get_random_string(length=32)
pending = PendingGDPRAgree(user=user, token=token)