From 9a9111889b787cecc64b4fb2ded1a7f7f08ae370 Mon Sep 17 00:00:00 2001 From: Virginia Dooley Date: Wed, 7 Jun 2023 19:04:15 +0100 Subject: [PATCH] Make token more unique to avoid conflict --- wcivf/apps/feedback/forms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wcivf/apps/feedback/forms.py b/wcivf/apps/feedback/forms.py index c3446c843..d51dc45c8 100644 --- a/wcivf/apps/feedback/forms.py +++ b/wcivf/apps/feedback/forms.py @@ -8,7 +8,8 @@ class FeedbackForm(forms.ModelForm): def __init__(self, *args, **kwargs): super(FeedbackForm, self).__init__(*args, **kwargs) - self.fields["token"].initial = uuid.uuid4().hex + hashed_token = hash(uuid.uuid4().hex) + self.fields["token"].initial = hashed_token class Meta: model = Feedback