Skip to content
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

Merged
merged 1 commit into from
Apr 5, 2023
Merged

Pre-SAC serialization bugfix #947

merged 1 commit into from
Apr 5, 2023

Conversation

timoballard
Copy link
Contributor

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 and is_usa_based). These were being stored in the UserProfile 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.

@timoballard timoballard temporarily deployed to dev April 5, 2023 14:56 — with GitHub Actions Inactive
@timoballard timoballard temporarily deployed to management April 5, 2023 14:56 — with GitHub Actions Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

Terraform plan for management

No changes. Your infrastructure matches the configuration.
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

📝 Plan generated in Tests for PRs #26

@github-actions
Copy link
Contributor

github-actions bot commented Apr 5, 2023

Terraform plan for dev

No changes. Your infrastructure matches the configuration.
No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration
and found no differences, so no changes are needed.

📝 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()
Copy link
Contributor Author

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
Copy link
Contributor Author

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)

@timoballard timoballard marked this pull request as ready for review April 5, 2023 15:07
@tadhg-ohiggins tadhg-ohiggins merged commit 5081c3b into main Apr 5, 2023
@tadhg-ohiggins tadhg-ohiggins deleted the tdb/gen-info-fixes branch April 5, 2023 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants