Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kieckhafer
Copy link
Member

@kieckhafer kieckhafer commented Jan 30, 2019

Impact: minor
Type: bugfix

Issue

While not confirmed to be the only way this happens, it seems that if a user has not run Migration 51 yet, when they pull in the changes that come along with Migration 56, inventoryQuantity / inventoryInStock gets set to NaN.

If a codebase is already past Migration 51 when the changes that include Migration 56 are pulled in, everything is OK.

Solution

Create a new migration, Migration 57, to make sure inventory in never set to NaN when a user has already run Migration 51. Also, go back and fix Migration 51 to address this issue for users who haven't run it yet.

Breaking changes

None

Testing

  1. Start an app from scratch
  2. Make sure all 57 migrations run
  3. See that neither inventoryInStock or inventoryAvailableToSell is set to NaN in the Products or Catalog collection

@kieckhafer kieckhafer changed the base branch from master to develop January 30, 2019 00:01
@kieckhafer kieckhafer requested a review from focusaurus January 30, 2019 19:50
@kieckhafer kieckhafer force-pushed the fix-kieckhafer-inventoryNaNIssue branch from b8bb530 to 0bb4301 Compare January 30, 2019 19:53
@kieckhafer kieckhafer changed the title [WIP] fix: Inventory is set to NaN in rare circumstances based on Migrations fix: Inventory is set to NaN in rare circumstances based on Migrations Jan 30, 2019
@focusaurus focusaurus merged commit 9f0891c into develop Jan 30, 2019
@focusaurus focusaurus deleted the fix-kieckhafer-inventoryNaNIssue branch January 30, 2019 21:48
@jeffcorpuz jeffcorpuz mentioned this pull request Mar 1, 2019
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.

3 participants