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(medusa): fixes bug for mpath incorrectly updated for nested categories #3311

Merged
merged 2 commits into from
Feb 22, 2023

Conversation

riqwan
Copy link
Contributor

@riqwan riqwan commented Feb 22, 2023

What:

On creating categories via API, the parent's children don't get updated to the latest version.

How:

Typeorm only updates mpath when the category entity of the parent is passed into create/save. For this reason, everytime we create a category, we must fetch the entity and push to create.

RESOLVES CORE-1166

@changeset-bot
Copy link

changeset-bot bot commented Feb 22, 2023

🦋 Changeset detected

Latest commit: b3573b2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@medusajs/medusa Patch
@medusajs/inventory Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@riqwan riqwan marked this pull request as ready for review February 22, 2023 12:31
@riqwan riqwan requested a review from a team as a code owner February 22, 2023 12:31
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

Nice one! Only a minor todo 💪

packages/medusa/src/services/product-category.ts Outdated Show resolved Hide resolved
packages/medusa/src/services/product-category.ts Outdated Show resolved Hide resolved
Copy link
Contributor

@fPolic fPolic left a comment

Choose a reason for hiding this comment

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

LGTM! Nice 💪

packages/medusa/src/types/product-category.ts Show resolved Hide resolved
Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM! 💪

@riqwan riqwan merged commit 68496ff into develop Feb 22, 2023
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