From dfb769ac530d8029236df4952f26cd969e286d5f Mon Sep 17 00:00:00 2001
From: Todd Dembrey <todd.dembrey@torchbox.com>
Date: Tue, 25 Sep 2018 11:58:55 +0100
Subject: [PATCH] Use a uuid hex as the newsletter cachebuster

---
 opentech/public/mailchimp/views.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/opentech/public/mailchimp/views.py b/opentech/public/mailchimp/views.py
index ae0a9e4a3..ed0ede580 100644
--- a/opentech/public/mailchimp/views.py
+++ b/opentech/public/mailchimp/views.py
@@ -1,6 +1,6 @@
 import logging
 
-from time import time
+import uuid
 
 from django.conf import settings
 from django.contrib import messages
@@ -86,7 +86,7 @@ class MailchimpSubscribeView(FormMixin, RedirectView):
             origin = self.request.META['HTTP_REFERER']
 
         # Add cache busting query string.
-        return origin + '?newsletter-' + str(time.time())
+        return origin + '?newsletter-' + uuid.uuid4().hex
 
     def get_redirect_url(self):
         # We don't know where you came from, go home
-- 
GitLab