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

Set company address country to UK for export enquiries #5842

Conversation

oliverjwroberts
Copy link
Contributor

@oliverjwroberts oliverjwroberts commented Dec 5, 2024

Description of change

Company records that were created from Great export enquiries did not have an address country as that information is not present in the incoming data. This, however, was causing issues when users were attempting to verify these company records with the DnB service: 400 - {"address":{"country":["This field is required."]}}.

To resolve this, it was agreed to set the address country as the UK for all newly created company records; a safe assumption given they are export enquiries.

This PR also adds a management command to modify existing Great export enquiries with associated companies that do not have an address country.

Checklist

  • Has this branch been rebased on top of the current main branch?

    Explanation

    The branch should not be stale or have conflicts at the time reviews are requested.

  • Is the CircleCI build passing?

General points

Other things to check

  • Make sure fixtures/test_data.yaml is maintained when updating models
  • Consider the admin site when making changes to models
  • Use select-/prefetch-related field lists in views and search apps, and update them when fields are added
  • Make sure the README is updated e.g. when adding new environment variables

See docs/CONTRIBUTING.md for more guidelines.

@oliverjwroberts oliverjwroberts self-assigned this Dec 5, 2024
@oliverjwroberts oliverjwroberts requested a review from a team as a code owner December 5, 2024 15:38
@oliverjwroberts oliverjwroberts force-pushed the fixup/CPS-644-set-company-country-to-uk-for-export-enquiries branch from 0f9f38e to 0276d2e Compare December 5, 2024 15:40
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.50%. Comparing base (166cb85) to head (0276d2e).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5842      +/-   ##
==========================================
- Coverage   96.50%   96.50%   -0.01%     
==========================================
  Files        1042     1043       +1     
  Lines       24755    24776      +21     
  Branches     1645     1646       +1     
==========================================
+ Hits        23890    23910      +20     
- Misses        709      710       +1     
  Partials      156      156              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@DeanElliott96 DeanElliott96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to run and then remove.

@oliverjwroberts oliverjwroberts merged commit e2bd3cd into main Dec 5, 2024
7 checks passed
@oliverjwroberts oliverjwroberts deleted the fixup/CPS-644-set-company-country-to-uk-for-export-enquiries branch December 5, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants