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

[16.0][FIX] sale_channel_search_engine: Add to index #23

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

qgroulard
Copy link

reopen #16


This is unnecessary to call _add_to_index() if we don't find indexes where the records should be added to.

This has a side effect:
_add_to_index() returns the bindings of the record, if no indexes is passed as argument to _add_to_index(), it does so for all the indexes.

Now imagine:

  1. Create 2 sale channels: Channel A linked to an index, Channel B not linked to any index.
  2. Add a product to both sale channels => A binding is created for this product as it is linked to Channel A.
  3. Remove the product from Channel A => _synchronize_channel_index() is triggered on the product.
  4. _add_to_index(None) will be called for Channel B => _add_to_index(None) will return all the bindings of the product, including the binding created by the link with Channel A.
  5. This binding will not be marked 'to_delete' as we mark 'to_delete' the bindings not returned by _add_to_index().

Copy link

github-actions bot commented Dec 1, 2024

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 1, 2024
@qgroulard
Copy link
Author

ping @hparfr @sebastienbeau

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Dec 8, 2024
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.

1 participant