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

[4171] Fix issue with storage location resetting on error. #4215

Merged

Conversation

aniketpatidar
Copy link
Contributor

Resolves #4171

Description

When creating a new purchase, if a storage location is selected and there's an error during submission, the storage location resets to the first one in the list. This PR addresses this issue by ensuring that the selected storage location remains unchanged in case of an error.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

This change has been tested by creating a new purchase, selecting a storage location, and intentionally causing an error during submission. Upon encountering the error, it was verified that the selected storage location remained unchanged.

Screencast

Screencast.from.23-03-24.11.44.13.PM.IST.webm

@aniketpatidar
Copy link
Contributor Author

Please review #4171, which resolves the purchase store_location resetting error. Thanks!

@dorner @cielf

@cielf
Copy link
Collaborator

cielf commented Mar 25, 2024

This passes my functionality test -- I uncovered a separate pre-existing issue, which is that a new purchase is not defaulting to the organization's default intake location. That is out of scope of this PR, though.

@dorner
Copy link
Collaborator

dorner commented Mar 26, 2024

All good here too!

@dorner dorner merged commit 5b3531d into rubyforgood:main Mar 26, 2024
19 checks passed
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.

[BuG] Storage location not preserved on error in new purchases
3 participants