From ba3182da610cab95bb1b10a85532936b725d38f4 Mon Sep 17 00:00:00 2001 From: Sym Roe Date: Tue, 23 May 2023 12:24:21 +0100 Subject: [PATCH] Add distinct to email qs --- .../signup_server/management/commands/sync_to_sendgrid.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dc_signup_form/signup_server/management/commands/sync_to_sendgrid.py b/dc_signup_form/signup_server/management/commands/sync_to_sendgrid.py index 772725b..3ba6cd4 100644 --- a/dc_signup_form/signup_server/management/commands/sync_to_sendgrid.py +++ b/dc_signup_form/signup_server/management/commands/sync_to_sendgrid.py @@ -20,7 +20,8 @@ def get_new_users(self, mailing_lists): ~Q(email="testy.mctest@democracyclub.org.uk"), added=False, mailing_lists=mailing_lists, - ) + ).distinct("email") + def handle(self, *args, **kwargs):