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: bin uniqueness #29519

Merged
merged 5 commits into from
Jan 31, 2022
Merged

fix: bin uniqueness #29519

merged 5 commits into from
Jan 31, 2022

Conversation

ankush
Copy link
Member

@ankush ankush commented Jan 30, 2022

  • In very rare cases concurrent updates can cause the creation of duplicate Bins.
  • In some cases, item/warehouse is not specified for a new bin, such bins are of no use.

Fix:

  • Add DB level unique constraint
  • Handle constraint failure but only from known util methods.
  • Add mandatory constraint on item_code and warehouse
  • Add pre-model-sync patch for accommodating new constraints and fixing broken bins if any.

@github-actions github-actions bot added the stock label Jan 30, 2022
@ankush ankush added the Skip Manual Testing The changes in this PR does not require manual testing label Jan 30, 2022
@codecov

This comment has been minimized.

s-aga-r
s-aga-r previously approved these changes Jan 31, 2022
Copy link
Contributor

@s-aga-r s-aga-r left a comment

Choose a reason for hiding this comment

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

@ankush everything looks good

@ankush ankush merged commit 5aa1b6b into frappe:develop Jan 31, 2022
@ankush ankush deleted the unique_bin branch January 31, 2022 08:59
ankush added a commit that referenced this pull request Jan 31, 2022
@ankush ankush removed the Skip Manual Testing The changes in this PR does not require manual testing label Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants