From 920de57f2b6963acff0855aa47ab0175f44434c5 Mon Sep 17 00:00:00 2001 From: "Andreas (@xAndy) Zimmermann" Date: Mon, 16 May 2022 19:49:01 +0200 Subject: [PATCH] only send mass messages to validated numbers --- shiftregister/team/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shiftregister/team/views.py b/shiftregister/team/views.py index 3bb27e6..03563b9 100644 --- a/shiftregister/team/views.py +++ b/shiftregister/team/views.py @@ -88,7 +88,7 @@ def bulk_message(request): Message.objects.bulk_create( ( Message(text=form.cleaned_data["message"], to=helper) - for helper in Helper.objects.all() + for helper in Helper.objects.filter(number_validated=True) ) ) messages.add_message(