-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-SAC serialization bugfix #947
Conversation
Terraform plan for management No changes. Your infrastructure matches the configuration.
📝 Plan generated in Tests for PRs #26 |
Terraform plan for dev No changes. Your infrastructure matches the configuration.
📝 Plan generated in Tests for PRs #26 |
@@ -22,7 +22,6 @@ class GeneralInformationForm(forms.Form): | |||
auditee_contact_title = forms.CharField() | |||
auditee_phone = forms.CharField() | |||
auditee_email = forms.CharField() | |||
user_provided_organization_type = forms.CharField() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this field is not actually submitted as part of the general information form, so we're removing it from the expected fields here
@@ -48,7 +48,7 @@ def eligibility_check(user, data): | |||
next_step = reverse("api-auditee-info") | |||
|
|||
# Store step 0 data in profile, overwriting any pre-existing. | |||
user.profile.entry_form_data = data | |||
user.profile.entry_form_data = serializer.data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should store the serialized data instead of the raw data, as the serialized data will have done the appropriate type conversions (e.g. "True" --> True
)
Relates to #563
#829 implemented the General Information form, but in so doing introduced a serialization issue for two of the pre-SAC boolean fields (
met_spending_threshold
andis_usa_based
). These were being stored in theUserProfile
as strings, which caused a downstream failure when the general information JSON document is checked against the JSON schema, which expects them to be boolean types.