Skip to content

Commit

Permalink
Remove old model import from views
Browse files Browse the repository at this point in the history
And the references to it in the confirm page view. Comment out
the assignment of the registration data to stop flake8
complaining.
  • Loading branch information
jimnarey committed Mar 8, 2024
1 parent dcd1b6d commit 3c6eb82
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions request_a_govuk_domain/request/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
RegistryDetailsForm,
WrittenPermissionForm,
)
from .models import RegistrationData

from django.views.generic.edit import FormView

from .utils import handle_uploaded_file
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 3c6eb82

Please sign in to comment.