From 3c6eb822cd6310ea025920b7fbadef7a4e80306f Mon Sep 17 00:00:00 2001 From: Jim Narey Date: Thu, 7 Mar 2024 19:45:21 +0000 Subject: [PATCH] Remove old model import from views And the references to it in the confirm page view. Comment out the assignment of the registration data to stop flake8 complaining. --- request_a_govuk_domain/request/views.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/request_a_govuk_domain/request/views.py b/request_a_govuk_domain/request/views.py index 7e0189a4..1f373882 100644 --- a/request_a_govuk_domain/request/views.py +++ b/request_a_govuk_domain/request/views.py @@ -19,7 +19,7 @@ RegistryDetailsForm, WrittenPermissionForm, ) -from .models import RegistrationData + from django.views.generic.edit import FormView from .utils import handle_uploaded_file @@ -192,13 +192,7 @@ def get_context_data(self, **kwargs): return context def form_valid(self, form): - registration_data = self.request.session.get("registration_data", {}) - - # Save data to the database - RegistrationData.objects.create( - registrant_full_name=registration_data["registrant_full_name"], - registrant_email_address=registration_data["registrant_email_address"], - ) + # registration_data = self.request.session.get("registration_data", {}) # Clear session data after saving self.request.session.pop("registration_data", None)