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

Redo product association on Variants if product was deleted #60

Open
cesartalves opened this issue Apr 8, 2021 · 1 comment
Open

Redo product association on Variants if product was deleted #60

cesartalves opened this issue Apr 8, 2021 · 1 comment
Labels

Comments

@cesartalves
Copy link
Contributor

I imagine this is a extreme edge case but I’ve managed to hit it a few times when I was testing the lib on a client project.

  • import a products csv with one row for the Master product and 1+ rows for its Variants
  • delete the Master Product in the console
  • rerun the import. The Master product row will be created, but the Variant rows will fail with Validation failed: Product must exist, Product can't be blank

Maybe we could tweak this line a bit so that it checks if the Product exists and, if not, assign context[:product] to it?

@stale
Copy link

stale bot commented Jun 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant