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

Spree::Variant#set_position conflicts with acts_as_list #5508

Closed
tkimi opened this issue Nov 12, 2023 · 0 comments · Fixed by #5509
Closed

Spree::Variant#set_position conflicts with acts_as_list #5508

tkimi opened this issue Nov 12, 2023 · 0 comments · Fixed by #5509

Comments

@tkimi
Copy link
Contributor

tkimi commented Nov 12, 2023

When creating a Variant, acts_as_list and set_position callback increment position.
So I think this commit needs to be picked.

Solidus Version:
4.3.0.dev

To Reproduce

$ RAILS_ENV=test bin/rails c
irb(main):001> require 'factory_bot_rails'
irb(main):002> variant = FactoryBot.create :variant
...
irb(main):003> variant.product.master.position
=> 1
irb(main):004> variant.position
=> 3
irb(main):005> multi_variant = FactoryBot.create :variant, product: variant.product
...
irb(main):006> multi_variant.position
=> 5

Current behavior
Not increase by 1

Expected behavior
Increase by 1

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 a pull request may close this issue.

1 participant