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

Fix billing acc. address error when town is empty #558

Merged
merged 4 commits into from
Dec 1, 2023

Conversation

Cruikshanks
Copy link
Member

Fix billing acc. address error when town is empty

https://eaflood.atlassian.net/browse/WATER-4231

Spotted whilst trying to change the billing account address locally. We were adding an FAO to a billing account address that turns out didn't have the town field populated. When we tried to confirm the change we kept getting an error from the ChargingModuleCreateCustomerChangePresenter.

After looking into it town was a property we were passing to our _truncate() method without first checking if the value existed. We also didn't have a unit test covering this scenario.

This change fixes the presenter and adds the missing unit test.

https://eaflood.atlassian.net/browse/WATER-4231

Spotted whilst trying to change the billing account address locally. We were adding an FAO to a billing account address that turns out didn't have the `town` field populated. When we tried to confirm the change we kept getting an error from the `ChargingModuleCreateCustomerChangePresenter`.

After looking into it `town` was a property we were passing to our `_truncate()` method without first checking if the value existed. We also didn't have a unit test covering this scenario.

This change fixes the presenter and adds the missing unit test.
@Cruikshanks Cruikshanks added the bug Something isn't working label Nov 29, 2023
@Cruikshanks Cruikshanks self-assigned this Nov 29, 2023
@Cruikshanks Cruikshanks marked this pull request as ready for review December 1, 2023 09:49
Copy link
Contributor

@Jozzey Jozzey left a comment

Choose a reason for hiding this comment

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

@Cruikshanks Cruikshanks merged commit 6818c13 into main Dec 1, 2023
7 checks passed
@Cruikshanks Cruikshanks deleted the fix-change-billing-address-town-error branch December 1, 2023 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants